var winHight = $(window).height(); var docHight = $(document).height(); if (docHight == (winHight + $(document).scrollTop())) { alert("buttom"); }