$("#but0_0").attr(...) works but $(hid).attr(...) does not work when hid === "#but0_0"
<p>On Safari 4.0, I have a check that prints "????" if hid === "#but0_0"</p>

<p>Works:</p>

<pre><code>$("#but0_0").attr("onmousedown",function(){alert("Aha!");});
</code></pre>

<p>Doesn't work:</p>

<pre><code>var id = "but"+y+"_"+x;
var hid = "#"+id;
if (hid === "#but0_0") console.debug("????");
$(hid).attr("onmousedown",function(){alert("Aha!");});
</code></pre>

<p>The console shows "????" so the code is getting hit and the variable is "the same" (from === string compare point of view) as the string literal but apparently jQuery's $() operator knows the difference?</p>

<p>I have 30 divs to manipulate and I need to compute the id of the div at run time. Any ideas? It's probably something simple like pulling out a "string" from a "String" or some such <a href="http://lists.canonical.org/pipermail/kragen-tol/2005-May/000782.html" rel="nofollow">JavaScript stupidity</a>.</p>
