title: IE7 & 8 throwing errors with jQuery's .slice
body: <p>The following code works great on other browsers, but on IE7 &amp; 8 it complains about it:</p>
  
  <pre><code>    var divs = $(".paginate-boxes li");
          for(var i = 0; i &lt; divs.length; i+=9) {
            divs.slice(i, i+9).wrapAll("&lt;li class='slide-portfolio'&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/li&gt;");
          }
  </code></pre>
  
  <p>The code that it's working on is a long list of <code>li</code>s like so:</p>
  
  <pre><code>                        &lt;li&gt;
                                  &lt;!--Fade--&gt;
                                  &lt;div class="mosaic-block fade"&gt;
                                      &lt;a href="http://www.example.com/destination/" class="mosaic-overlay"&gt;
                                          &lt;object class="details"&gt;
  
                                              &lt;h4&gt;Destination Page&lt;/h4&gt;
                                              &lt;p&gt;
                                                                                                  &lt;/p&gt;
                                          &lt;/object&gt;
                                      &lt;/a&gt;
                                      &lt;div class="mosaic-backdrop"&gt;&lt;img width="296" height="175" src="http://www.example.com/wp-content/uploads/this_thumb.jpg" class="attachment-portfolio-image wp-post-image" alt="this_thumb" title="This image" /&gt;&lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/li&gt;
  </code></pre>
  
  <p>Using the Dev tools in IE9 (in 8 mode), I found that it complains when it gets to the <code>.slice</code> bit of the code, referencing this bit of jQuery (v.1.7.2)</p>
  
  <pre><code>// IE6-8 fail to clone children inside object elements that use
  // the proprietary classid attribute value (rather than the type
  // attribute) to identify the type of content to display
  if ( nodeName === "object" ) {
      dest.outerHTML = src.outerHTML;
  }
  </code></pre>
  
  <p>Not sure exactly what that means tbh</p>
  
  <p>What do I need to change to stop it throwing an error, and why?</p>