Created
June 12, 2013 07:19
-
-
Save jbonney/5763407 to your computer and use it in GitHub Desktop.
Unveil.js: Lazy load images with support for serving high-resolution images to devices with retina displays. http://luis-almeida.github.io/unveil/
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
| $(document).ready(function() { | |
| $("img").unveil(); | |
| // Alternatively, load images X pixels before they are displayed | |
| //$("img").unveil(X); | |
| }); |
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
| <img src="bg.png" data-src="img1.jpg" /> | |
| <img src="bg.png" data-src="img2.jpg" data-src-retina="img2-retina.jpg" /> | |
| <noscript> | |
| <img src="img1.jpg" /> | |
| </noscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment