title: Detect when scrolled to last li
body: <p>I need to check if the user has scrolled to the end of a list item <code>&lt;li&gt;</code> on my page. I want to perform an <em>AJAX</em> call, when this happens.</p>
  
  <p>How to know if the user has scrolled to the last list item.</p>
  
  <p>This is what I've tried till now.</p>
  
  <pre><code>if ($('li:last').is(':visible')) {
      alert('Scrolled to last li');
  }
  </code></pre>
  
  <p>But, unfortunately it is not working.</p>