Skip to content

Instantly share code, notes, and snippets.

@jonathanstark
Last active December 28, 2015 20:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jonathanstark/7557840 to your computer and use it in GitHub Desktop.
Save jonathanstark/7557840 to your computer and use it in GitHub Desktop.
TechCrunch blog post: lazy load images
// Lazy load "below the fold" images
$(window).on('load', function(){
$('img').each(function(){
if(this.src.match('1x1.png')) {
this.src = $(this).attr('data-src');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment