jQuery的分页问题 [英] Pagination Problem with jQuery

查看:89
本文介绍了jQuery的分页问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我正在开发一个ASP.NET项目,在我的项目中我想在​​向下滚动时加载产品。我在下面写的代码;



Hi guys i am developing an ASP.NET project and in my project i want to load products when the scroll down. This code which I write below;

$(window).scroll(function () {
                //console.log($(window).scrollTop().toString() + " - " + ($(document).height() - $(window).height()).toString());
                if ($(window).scrollTop() >= $(document).height() - $(window).height()) {
                    if (isPaginationEnded) { // if previous fetch has been completed.
                        fetchProducts(categoryId, ++pageIndex);
                    }
                }
            });





<当页面缩放%100时,
工作正常,但是当缩放改变它不起作用时。



任何帮助将不胜感激,



谢谢大家。




works perfectly when the page zoom %100, but when the zoom change it does not working.

Any help would be greatly appreciated,

Thanks everyone.

推荐答案

(窗口).scroll(function(){
// console.log(
(window).scroll(function () { //console.log(


(window).scrollTop()。toString()+ - +(
(window).scrollTop().toString() + " - " + (


(document).height() -
(document).height() -


这篇关于jQuery的分页问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆