Skip to content

tulios/jquery.lazy_content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jQuery.LazyContent

Lazy load of any content made easy

Any content

Include src/jquery.lazy_content.js

$(".elements").lazyContent({
  threshold: 0, // The amount of pixels to load earlier
  load: function(element) { // Callback for loaded element
    // Do some magic
  }
});

Destroying the plugin

$(".elements").lazyContent("destroy");

Only images

Include src/jquery.lazy_content.js and src/jquery.lazy_content_img.js

$("img.lazy").lazyContentImg({
  threshold: 0 // The amount of pixels to load earlier
});

Demo and examples

Refer to the jQuery.LazyContent website for examples