jQuery-Retina
jQuery-Retina copied to clipboard
Idea: update script this to be a polyfill for srcset
If the 'jQuery-Retina' script was updated to read the x2 image location from the srcset attribute instead it would work as a great polyfill for srcset.
So jQuery retina markup would read:
< img src="/image-x1.png" srcset="/image-x2.png 2x" >
and read/display the image-x2.png from the scrset attribute. This way we can get rid of the data-retina attribute from our markup and modern browsers like Chrome (from v34 onwards) would use the srcset attribute.
Ref: http://blog.chromium.org/2014/02/chrome-34-responsive-images-and_9316.html