$(document).ready(function () { $(window).scroll(function () { if ($(window).scrollTop() == $(document).height() - $(window).height()) //Free when the scrollbar rolls to the bottom{ } }); })