0

So i am trying to load a content through ajax when reaching a particular position. Below function works pretty good in web page, ipad emulator but doesn't work as expected in real ipad. In real ipad, it doesn't load at the exact position but little later.

  var monitorScrollPosition = function () {
    var reach_point_top = $("#ldp-mainmap-container").offset().top;
    $(window).scroll(function () {
      var scroll_position_top = $(window).scrollTop();
      var scroll_position_bottom = scroll_position_top + $(window).height();
      if ((scroll_position_bottom > reach_point_top) && count < 1) {
        loadContent();
      }
    });
  };
Rahul Dess
  • 2,397
  • 2
  • 21
  • 42

1 Answers1

0

On iPad or any other iOS devices, onscroll event is fired only after you've stopped scrolling.

See this stackoverflow answer by kennytm about this subject : https://stackoverflow.com/a/2863570/3455109

Community
  • 1
  • 1
Sam Renault
  • 15
  • 1
  • 5