title: How to remove a selection of table rows from a table using detach()?
body: <p>I have a table, which I want to split into rows of x, which should be removed from the table and added to subpages I'm creating. I can slice the table, but <code>detach()</code> doesn't work and I'm not sure what I'm doing wrong. </p>
  
  <p>Here is what I have:</p>
  
  <pre><code>    var rows = $( table ).find( "tbody tr, TBODY TR" ).toArray(),
          splitRows = [];
  
      for( i = 0; i &lt; rows.length; i += rowsPerPageS ){
  
         // table rows for each subpage
         var takeAway = splitRows.push( rows.slice(i, i + rowsPerPageS ) );
  
         // split the tabel and create subpages
         newPage = takeAway.detach()
                           .wrap(...
         }
  </code></pre>
  
  <p><strong>Question:</strong><br>
  Console tells me <em>takeAway.detach is not a function</em> and I don't know what I'm doing wrong. How do I remove my sliced table-rows and wrap them correctly?</p>