title: jQuery InfiniteScroll plugin loads the last page over and over
body: <p>I'm using the <a href="http://www.infinite-scroll.com/infinite-scroll-jquery-plugin/" rel="nofollow noreferrer">following jQuery InfiniteScroll</a> plugin which actually works but keeps loading the last page over and over, it can't be stopped. Here's the code which I use:</p>
  <pre><code>$('#catalog').infinitescroll({
       
          navSelector  : &quot;div.page-nav:last&quot;,            
                         // selector for the paged navigation (it will be hidden)
          nextSelector : &quot;div.page-nav a.navnext:last&quot;,    
                         // selector for the NEXT link (to page 2)
          itemSelector : &quot;#catalog div.single&quot;,          
                         // selector for all items you'll retrieve
  
          bufferPx     : 400
  }); 
  </code></pre>
  <p>And my pagination looks like the following:</p>
  <pre><code>&lt;div id=&quot;page-nav&quot; class=&quot;page-nav&quot;&gt; 
      &lt;div class=&quot;top&quot;&gt;
          &lt;a id=&quot;page-1&quot; class=&quot;active&quot;&gt;1&lt;/a&gt;
          &lt;a id=&quot;page-2&quot; href=&quot;?page=2&quot;&gt;2&lt;/a&gt;
          &lt;a id=&quot;page-3&quot; href=&quot;?page=3&quot;&gt;3&lt;/a&gt;
          &lt;a id=&quot;page-4&quot; href=&quot;?page=4&quot;&gt;4&lt;/a&gt;
          &lt;a id=&quot;page-5&quot; href=&quot;?page=5&quot;&gt;5&lt;/a&gt;
          &lt;a id=&quot;page-6&quot; href=&quot;?page=6&quot;&gt;6&lt;/a&gt;
          &lt;a id=&quot;page-7&quot; href=&quot;?page=7&quot;&gt;7&lt;/a&gt;
          &lt;/div&gt;
      &lt;div class=&quot;bottom&quot;&gt;
          &lt;span class=&quot;right&quot;&gt;
              &lt;a class=&quot;navnext&quot; href=&quot;?page=2&quot; id=&quot;next-2&quot;&gt;Next&lt;/a&gt;
                  &lt;span class=&quot;next&quot;&gt;Ctrl&lt;/span&gt;
          &lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>