How to stop retina.js if iPhone dected

75 views Asked by At

I've got my jquery slideshows looking sharp with retina displays thanks to retina.js, but I only want retina.js to function for non-iPhone retina devices. (iPads and laptops). So, I just need a bit of code to tell retina/js to not function if an iPhone is detected.

Can anyone suggest some code? Thank you!

1

There are 1 answers

2
megawac On

I don't know how you're detecting if the user is on an iPhone but simply loading only retina.js when you deem appropriate should be all you need to do

if (!browser.iphone) $.getScript("path/to/retina.js");

Where browser.iphone is your browser detection code