Jquery 'addClass' sometimes fails but css does not
<p>in some cases, this will not work:</p>

<pre><code>("#id").addClass("class");
</code></pre>

<p>whereas this will:</p>

<pre><code>("#id").css('color','Blue');
</code></pre>

<p>why would it fail and how to add class otherwise?</p>
