Best way to wrap elment in a technical selector
<p>In a project, I often manipulate the DOM by adding / replacing elements from an HTML string :</p>

<pre><code>$("#myDiv").html("&lt;ul&gt;&lt;li&gt;foo&lt;/li&gt;&lt;li&gt;bar&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is a list&lt;/p&gt;");
</code></pre>

<p>I would like to wrap those in "something with a technical id attached" so that my jQuery selectors can be targetted to these specific fragmeents of the page.</p>

<p>Something like that :</p>

<pre><code>var techId = ...; 
$("#myDiv").html(wrap(techId, "&lt;ul id="myList"&gt;&lt;li&gt;foo&lt;/li&gt;&lt;li&gt;bar&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is a list&lt;/p&gt;"));
$(document).on("click", "#"+techId+" #myList", function(event){
    alert("List clicked");
});
</code></pre>

<p>What should be the content of the "wrap" function knowing that the wrapper cannot have any visual impact one the page, in any situation.</p>

<p>Calling .remove() on the wrapper should remove the wrapped element but there should be a way of removing the wrapper without modifying the elements inside (at the expense of breaking the selectors).</p>
