jQuery -> Selected Element to HTML
<p>I am trying to wrap specific elements in a box if the visitor is using &lt; IE9 so I can apply a box shadow across all browsers.</p>

<p>Unfortunately I cannot quite work out how to do it. Does anyone know how to convert the selected element back into HTML?</p>

<pre><code>&lt;script&gt;
    $(document).ready(function() {
        $('img').each(function() {
            var img = $(this).clone();
            var html = '&lt;div class="bounding"&gt;'+$(img)+'&lt;/div&gt;';
            $(this).replaceWith(html);
        });
    });
&lt;/script&gt;
</code></pre>

<p>The script is printing out <code>[object Object]</code>. <code>.html()</code> doesn't work because that is basically innerHTML. Is there a jQuery function that achieves this?</p>
