0

I have a select dropdown and I want to load more options in it when the scroll bar reaches at bottom but could not do. I used the following code but this did not work for me

$(function () {
             var $win = $('#CouponProduct_0_id_brand');

             $win.scroll(function () {
                 if ($win.scrollTop() == 0)
                     alert('Scrolled to Page Top');
                 else if ($win.height() + $win.scrollTop()
                                == $(document).height()) {
                     alert('Scrolled to Page Bottom');
                 }
             });
         });
Charles
  • 50,943
  • 13
  • 104
  • 142
Manish Jangir
  • 5,329
  • 4
  • 42
  • 75
  • I suggest you convert your select to a widget - there is not a safe way to detect what you are trying to detect – mplungjan Mar 24 '14 at 08:05

1 Answers1

0

Found your answer here

Instead of automatically loading more list-items, I suggest placing a button users can tap to load more (but that's just my suggestion).Reference

Check out this pulgin

Community
  • 1
  • 1
Bhavik
  • 4,836
  • 3
  • 30
  • 45