show() Not Working With Class
<p>This is an easy bit of coding, but something's there that i am doing wrong.I just can't figure it out.</p>



<pre><code>#div {
    display:none;
}
</code></pre>

<p>JS:</p>



<pre><code>function show() {
    var class = 1;
    $("#div." + class).show("slow");    
}
</code></pre>

<p>HTML:</p>



<pre><code>&lt;div id="div" class="1"&gt;John&lt;/div&gt;
&lt;div id="div" class="2"&gt;Tanner&lt;/div&gt;
&lt;input type="button" onclick="show()" /&gt;
</code></pre>

<p>Here I am trying to 'show()' a <code>div</code> of specific class.<br>
The problem is, this code works fine for <code>class="1"</code>. But when I change <code>var class</code> to <code>2</code>, it stops working.</p>
