鲁艳红

导航

 

        //页面初期加载时
        $(document).ready(function () {

            //加载第一页
            LoadList();

            //滚动换页
            $(window).scroll(function () {
                //向上翻页判定
                if ($(document).scrollTop() <= $(window).height()) {
                    console.log("滚动条已经到达顶部为" + $(document).scrollTop());
                    return;
                }

                //向下翻页判定
                if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
                    console.log("滚动条已经到达底部为" + $(document).scrollTop());
                    return;
                }

                LoadList();
                pageIndex++;
            });

posted on 2016-07-27 19:07  鲁艳红  阅读(1395)  评论(0)    收藏  举报