How do you know the scroll bar has reached bottom of a page

后端 未结 4 775
悲哀的现实
悲哀的现实 2020-12-11 01:37

I have a HTML page, when the scroll bar reaches bottom of the page I need to slide in a div from bottom-right containing an iframe.

Using JQuery I have implemented

4条回答
  •  再見小時候
    2020-12-11 02:12

    $(window).scroll(function(){ // each time the scroll event is triggered
        if($(window).scrollTop() + screen.height > $('body').height()) {
            // if scroll has reached the bottom, execute this 
        }
    };
    

提交回复
热议问题