Been doing tests using modernizr and css media queries to see results on different devices. I added a test for -webkit-device-pixel-ratio:2 to detect when there's a retina display device, which will then execute a small jquery script to insert an image into the page.
However the script doesn't get executed, instead it calls the callback function of another test. Any ideas why this is? Been testing on ipad 2, iphone 4 and android emulator.
The pure css media query works like a charm, and inserts a message. The Modernizr mq test doesn't seem to work.
/*
* Retina Display Test
*/
{
test: Modernizr.mq('-webkit-device-pixel-ratio:2'),
yep: 'js/retina.js',
nope: 'js/regular.js',
},//end retina test
https://dl.dropbox.com/u/85173358/devicewidth/orientation.html