Why is jQuery adding a space to the class attribute?
<p>I'm having some strange issues with <code>.removeClass()</code> and <code>.addClass()</code> in jQuery.</p>

<p>Specifically it seems that when I use <code>.removeClass()</code> the class is indeed removed, but a single space is left in it's place.  then when I <code>.addClass("secondclass")</code> I get <code>class=" secondclass"</code> (with the space in front).</p>

<p>I'm using jQuery 1.4.1</p>

<p>Is this intended behaviour or a bug?  How to stop it?</p>

<p><strong>UPDATE:</strong></p>

<p>Some people have asked what problems this is causing.  Well, I'm using thins: </p>

<pre><code>$("img.someclass").click(function() {
</code></pre>

<p>I'm testing this with Firefox 3.6.3</p>

<p><strike>Which does not trigger with the space in front of the class name.  When I manually remove the space it works fine.</strike>  It seems that there is more too this problem than the space issue, and most likely the space wasn't causing any issues (glad it's gone though ;)  - Will post seperate question regarding the ongoing issue.</p>
