The $ dollar sign
<p>I have something simple like this:</p>

<pre><code>$(selector).append("somestuff");
</code></pre>

<p>But since I'm going to reuse the selector I cache it with:</p>

<pre><code>var $selector = $(selector);
</code></pre>

<p>So I end up with:</p>

<pre><code>$selector.append("somestuff");
</code></pre>

<p>My question is, should I be doing that, or should I be doing:</p>

<pre><code>var selector = $(selector);
selector.append("somestuff");
</code></pre>

<p>Trying either one, both works. Which method is correct, and why?  Is the <code>$</code> in <code>$selector</code> unnecessary because the jquery object has already been declared in <code>$(selector)</code>?</p>

<hr>

<h3>Edit</h3>

<p>Thanks for the answers. It seems very simple and quite clear. Still, there seems to be disagreement over whether or not I should use <code>$</code> in the variable. It would be nice for everyone to vote up an answer. :)</p>
