title: Detect if the select box scroll bar has reached to bottom
body: <p>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</p>
  
  <pre><code>$(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');
                   }
               });
           });
  </code></pre>