Lazy load of any content made easy
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
}
});
$(".elements").lazyContent("destroy");
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
});
Refer to the jQuery.LazyContent website for examples