Remove span using global variable in jQuery
<p>I create a span with a global variable like this:</p>

<pre><code>var $span = jQuery('&lt;span&gt;&lt;/span');
jQuery($span).append('&lt;img src="myimage.gif"/&gt;'); 
jQuery($span).insertAfter('#username');
</code></pre>

<p>It works but I would like to remove the span in some part of my code. 
I try with:</p>

<pre><code>$span.remove();
</code></pre>

<p>but it doesn't work. </p>

<p>Thanks!</p>
