jQuery Lazy Scroll Loading Examples

Simple demo:

Usage:
$(document).ready(function() {
	$("#lazyScrollLoading").lazyScrollLoading({
		lazyItemSelector : ".lazyItem",
		onLazyItemFirstVisible : function(e, $lazyItems, $firstVisibleLazyItems) {
			$firstVisibleLazyItems.each(function() {
				this.innerHTML = this.getAttribute("lazy-text");
			});
		}
	});
});
Simple demo: Image mode (copy attribute lazy-img into src)

Usage:
$(document).ready(function() {
	$("#lazyScrollLoading_ImageMode").lazyScrollLoading({
		isDefaultLazyImageMode : true
	});
});
Simple demo: Scroll event

logger:

Usage:
$(document).ready(function() {
	var $loger = $("#scrollEventLogger");
	$("#lazyScrollLoading_ScrollEvent").lazyScrollLoading({
		onScrollToTop : function() {
			$loger.append($("<div>on scroll to top</div>"));
		},
		onScrollToBottom : function() {
			$loger.append($("<div>on scroll to bottom</div>"));
		},
		onScrollToLeftmost : function() {
			$loger.append($("<div>on scroll to leftmost</div>"));
		},
		onScrollToRightmost : function() {
			$loger.append($("<div>on scroll to rightmost</div>"));
		}
	});
});
Simple demo: Window scroll to the end

Usage:
$(document).ready(function() {
	var $container = $("#lazyScrollLoading_WindowScrollToEnd");
	$(window).lazyScrollLoading({
		onScrollToBottom : function(e, $lazyItems) {
			$container.append($("<li>New Lazy Item</li>"));
		}
	});
});
Advance demo: Lazy tree

Usage:
$(document).ready(function() {
	var count = 0;
	$("#lazyScrollLoading_LazyTree").lazyScrollLoading({
		lazyItemSelector : ".loadingPoint",
		onLazyItemFirstVisible : function(e, $lazyItems, $firstVisibleLazyItems) {
			$firstVisibleLazyItems.removeClass("loadingPoint").text($firstVisibleLazyItems.text().replace("Loading ...", "Lazy tree node"));
			for ( var i = 0; i < 14; i++) {
				count++;
				$(this).append($("<li style='padding-left: 30px;'>2." + count + " Lazy tree node</li>"));
			}
			count++;
			$(this).append($("<li style='padding-left: 30px;' class='loadingPoint'>2." + count + " Loading ...</li>"));
			$(this).clearLazyScrollLoadingCachedLazyItems();
		}
	});
});