title: IE6 performance issues with adding className on multiple elements (jQuery tableHover plugin)
body: <p>In an application I write that uses a large HTML table of numbers the design requires that the row and column of the hovered cell will be highlighted.</p>
  
  <p>I develop all the JS for this project using jQuery 1.3.x, and I found the <strong>tableHover</strong> plugin that does exactly what I need.</p>
  
  <p>But:</p>
  
  <p>on IE6 the performance of this plugin drops down as the number of cell elements rise to a point where the page is almost unresponsive.</p>
  
  <p>I thought that the problems lies in the plugin and I actually rewrote it's entire functionality from scratch, just to discover that I have the same performance issues.</p>
  
  <p>After debugging the code I now know that selecting a large amount of elements plus applying <strong>className</strong> (<strong>jQuery.addClass()</strong>) is extremely slow on IE6.</p>
  
  <p>I tried to use <strong>jQuery.css()</strong> instead with only <strong>background-color</strong>, the performance is better, but again, when the number of table cells rise the performance drops to an unusable state, and on all other browsers the performance of <strong>jQuery.css()</strong> is way slower than <strong>jQuery.addClass()</strong>.</p>
  
  <p>The main problem here is that there is no common parent to a table column, so in order to style a column one needs to traverse the entire table, select each row and then find the right <em>nth-child</em> <strong>td</strong>. my jQuery code for this one looks like that:</p>
  
  <pre><code>//col_num is the current td element
  //table is the parent table    
  var col_num = cur_cell.prevAll().length + 1;
  var this_col = $('tr td:nth-child(' + col_num + ')', table);
  </code></pre>
  
  <p>I won't paste my entire code here because it's irrelevant for the issue.
  The only answer I'm looking for is: Is there a known method to do what I need in a better performance margin? I'm not looking for "Chrome" performance speed, just something faster than "non responsive".</p>
  
  <p>Thnaks </p>
  
  <p>Tom.</p>