Weird jQuery error
<p>I was going along minding my jQuery business, when all of a sudden, I tried to do this:</p>

<pre><code>var myVariable = 'some-id-here';
$('#' + myVariable).addClass('some-class');
</code></pre>

<p><strong>Everything went fine and dandy until I closed my browser</strong>. After I reopened the page, jQuery threw this weird error:</p>

<pre><code>Uncaught Syntax error, unrecognized expression: #
</code></pre>

<p>I was able to replace the second line with this and have it work, but I am curious why the first part didn't work after I closed and reopened my browser.</p>

<pre><code>    $(document.getElementById(myVariable)).addClass('current');
</code></pre>
