Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery if $(window) scroll down function [duplicate]

Tags:

jquery

hello I need when $(window) is scrolled down with 100% alert something how can I do it?

like image 496
Val Do Avatar asked Dec 14 '22 20:12

Val Do


1 Answers

Try:

$(window).scroll(function() {
   if($(window).scrollTop() + $(window).height() == $(document).height()) {
       alert("END!");
   }
});

DEMO

like image 156
laaposto Avatar answered Jan 09 '23 18:01

laaposto