title: Insert rows into table (second last) with ajax
body: <p>I have a table with by default 25 rows, when i scroll at the bottom of the table i want to insert 25 more rows etc... everything is working correctly, but in a specific table i want to keep the last row of the first 25 rows and put the 25 next before it.</p>
  
  <p>Ex :</p>
  
  <pre><code>&lt;table id="maintable" name="maintable"&gt;
  &lt;tr&gt;
      &lt;td id="row 1"&gt;&lt;/td&gt;
      &lt;td id="row 2"&gt;&lt;/td&gt;
      &lt;td id="row 3"&gt;&lt;/td&gt;
      &lt;td id="row 4"&gt;&lt;/td&gt;
      ....
      &lt;td id="row 24"&gt;&lt;/td&gt;
      &lt;td id="row 25"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>After scrolling i want to have:</p>
  
  <pre><code>&lt;table id="maintable" name="maintable"&gt;
  &lt;tr&gt;
      &lt;td id="row 1"&gt;&lt;/td&gt;
      ...
      &lt;td id="row 24"&gt;&lt;/td&gt;
      &lt;td id="row 26"&gt;&lt;/td&gt;
      &lt;td id="row 27"&gt;&lt;/td&gt;
      ...
      &lt;td id="row 48"&gt;&lt;/td&gt;
      &lt;td id="row 49"&gt;&lt;/td&gt;
      &lt;td id="row 50"&gt;&lt;/td&gt;
      &lt;td id="row 25"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>So i just want to keep this "row 25" at the bottom of the table</p>
  
  <p>So i am trying to do the ajax with</p>
  
  <pre><code>function ScrollLoader(){
      $.ajax({
          url: '../myScrollLoader/scroll.inc.php',
          type: 'POST',
          data: $('#formScrollLoader').serialize(),
          success: function(result) {
                  $("#maintable tbody&gt;tr:last").prev("tr").append(result);
                  $(window).data('ajaxready', true);
              }
          }
      });
  }
  </code></pre>
  
  <p>It barely works but the 25 "next" are adding Inside the last TD of the 24 row and not After him (I'm not sure if i'm totaly clear with my english)</p>