我每次都在窗口的用户scrolls to the bottom
附加一些php files using ajax
。为同一事件的每次发生追加数据
$(window).scroll(function(){
if($(window).scrollTop() + $(window).height() > $(document).height() - 100){
$(window).unbind('scroll');
// Function to append php files using ajax
}
})
我想认下一次用户滚动到页面的底部,并追加一些其他PHP文件,但我如何找出滚动到页面底部的下一个(1或多个)事件?
Example: First scroll to bottom: Append 1.php 2.php
second scroll to bottom: append 3.php 4.php
third scroll to bottom: append 5.php 6.php
4th scroll to bottom: show footer
我不需要infinite scroll plugin
。因为那里没有footer
的概念。
为什么不简单地算一下......? – Johan
我做了它不正常....我有一个if语句来执行一个块 –