Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 您是否将滚动分页转换为ajax?_Javascript_Jquery_Ajax_Pagination - Fatal编程技术网

Javascript 您是否将滚动分页转换为ajax?

Javascript 您是否将滚动分页转换为ajax?,javascript,jquery,ajax,pagination,Javascript,Jquery,Ajax,Pagination,我想知道您是否将滚动分页转换为ajax。基本上我不想滚动分页,我想添加一个替代。滚动分页查询太大,我想替换它。我是否将其转换为ajax?代码如下: feeds.scrollFeedPagination({ 'contentPage': 'index.php', 'contentData': { 'last_time' : last_time }, 'scrollTarget': feeds, 'beforeLoad': function(){ feeds.parents('#f

我想知道您是否将滚动分页转换为ajax。基本上我不想滚动分页,我想添加一个替代。滚动分页查询太大,我想替换它。我是否将其转换为ajax?代码如下:

 feeds.scrollFeedPagination({
 'contentPage': 'index.php',
 'contentData': {
 'last_time' : last_time
 },
 'scrollTarget': feeds, 
 'beforeLoad': function(){
 feeds.parents('#feeds').find('.loading').fadeIn();
 },
 'afterLoad': function(elementsLoaded){
 $(elementsLoaded).fadeInWithDelay();
 }
 });

如果我不想要滚动分页,我是否要将其转换为ajax?有人能发布代码吗?

当滚动条触底时,检查滚动条,然后调用AJAX函数,该函数将获取记录

$(windows).scroll(function(){
 if($(window).scrollTop() + $(window).height() == $(document).height()) {
   //call ajax and on it's sucess do whatever you wanted to do
 }
});

如果您有任何疑问,请告诉我。

即使在第三次阅读该文本后,我仍然不明白您到底想要什么。看起来您已经在使用AJAX了。想必无论您使用什么客户端都不会影响您的服务器端查询?是的,我尝试使用ajax,但我不确定这是否是删除滚动分页的正确方法“滚动分页”的定义是什么