Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
On mobile devices, the same products displayed when i scroll down. But its working on computer. This is test domain: http://test.galatabutikno3.com/urun/listesi

JavaScript
var pageNumber = 1;
var pagePost = true;
$(window).scroll(function () {
               if (pagePost) {
                if ($(window).scrollTop() >= $(document).height() - $(window).height()) {
                    $.ajax({
                        url: '/product/list',
                        data: { "pageNumber": pageNumber},
                        success: function (data) {
                            if ($.trim(data) == '' || data == null || data.result == "0") {
                                pagePost = false;
                                return;
                            }
                            else {
                                $("#productList").append(data);
                                pageNumber++;
                           }

                        }
                    });
                }
            }
        });


What I have tried:

I dont know what am i supposed to do
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900