shtelya
8/10/2017 - 8:36 PM

Detect the scrolling to bottom of the page using jQuery.

Detect the scrolling to bottom of the page using jQuery.

$(window).on("scroll", function() {
	var scrollHeight = $(document).height();
	var scrollPosition = $(window).height() + $(window).scrollTop();
	if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
	    // when scroll to bottom of the page
	}
});