Click here to Skip to main content
12,507,845 members (55,206 online)
Rate this:
 
Please Sign up or sign in to vote.
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);
                    }
                }
            });


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

Any help would be greatly appreciated,

Thanks everyone.
Posted 11-Dec-12 2:26am
bounik425
Comments
Sheikh Muhammad Haris 12-Dec-12 18:59pm
   
Can you provide a little more detailed code ?

1 solution

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 31 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100