Applying class to an element - JQuery
<p>I am working on a web page that has a large number of tables. The JQuery script processes each row and decides what CSS style needs to be applied to it. I am using this snippet to apply a class to the table cell</p>

<pre><code>$myElem.parents('td').eq(0).attr('class', 'requiredClass');
</code></pre>

<p>Functionally, it works as expected. However, in IE7.0, it takes 16ms to run this. Given the number of rows on the page, this adds up pretty quickly to atleast half a second.</p>

<p>How can I make this run faster?</p>
