Created
October 31, 2012 13:43
-
-
Save gavinblair/3987105 to your computer and use it in GitHub Desktop.
replace which folder to grab img src's from
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//responsive images | |
retina = window.devicePixelRatio > 1 ? true : false; | |
var l = "l"; | |
if(retina) { | |
$("html").addClass("retina"); | |
l = 'h'; | |
$('img').each(function(){ | |
$(this).attr("src", $(this).attr("src").replace("/l/", "/h/")); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment