scroll事件

 $(window).scroll(function(){
        var clientHeight = $(window).height(),
        scrollTop = $(window).scrollTop(),
        scrollHeight = $(document).height();
        if(clientHeight + scrollTop >=  scrollHeight ){
            waterfall.addBlocks();
        }
    })
原文地址:https://www.cnblogs.com/mofish/p/2385671.html