jQuery wrapAll children if they dont already have a parent with certain class
<p>Im using the following to wrap all items with a class of 'child' with a div with a class of 'parent': </p>

<pre><code>$(".child").wrapAll('&lt;div class="parent" /&gt;');
</code></pre>

<p>The issue is that the function is sometimes rerun and I dont want multiple div.parents' to be created. How can I add a condition to my code so the div.parent is only added if div.childs' dont already have a parent with a class of 'parent'? Thanks </p>
