Preserve reference to element after deletion and subsequent re-insertion
<p>Within document.ready, I store a selector in a variable (which I assume once evaluated, stores the element object in said variable), as I need to manipulate it many times. </p>

<p>ie. <code>myVar = $('#mySpan');</code></p>

<p>What I'm storing is a span element within a div. One of the manipulations requires me to overwrite the contents of the div using the .html() function. </p>

<p>After, I need to reinsert that span element inside the div mentioned above and do so using the html() function. </p>

<p>The problem I have is that once the span element has been re-added, the variable myVar is no longer associated with the span element. I assume this is because it was deleted from the DOM and then re-added. </p>

<p>I know that jquery has the .detach() function, but that seems to only preserve attached events and data elements, but not actual references. I don't even thing the .live() function would help in this case either.</p>
