I'm working on an app which requires showing images according to the user's device. So I'm using the following Javascript code to show the menus and their icons:
var $imgsrc;
if(dummy_url_decode(results.rows.item(i).title) == "Web Info")
$imgsrc = "icons/web_info.png";
if(dummy_url_decode(results.rows.item(i).title) == "Misc.")
$imgsrc = "icons/misc.png";
Now I want to apply condition if the device is with retina display then it should show different icons for it. I have the media query syntax but dont know how to change the img path from CSS. Can anybody help me? The media query I'm using is:
@media screen and (-webkit-min-device-pixel-ratio: 2) and (min-device-width : 768px) and (max-device-width : 1024px)