I've come up against this a few times. I now use this type of approach: $('table tr').each( function() { var row = $(this); row.hover( function() { setTimeout( function() { row.addClass('hover'); }, 0 ); }, function() { setTimeout( function() { row.removeClass('hover'); }, 0 ); } ); });
Karl Rudd On Fri, Mar 28, 2008 at 6:58 AM, Sand Dragon <[EMAIL PROTECTED]> wrote: > > I'm trying to use the hover event on a series of data with 18 columns > of data. Here's a sample of the code: > > $("tr.orders").hover( > function() { $(this).addClass("highlighted"); }, > function() { $(this).removeClass("highlighted"); } > ); > > This works beautifully in Firefox and IE (specifcally v7) but in IE > the performance is exponentially slower. Some of the pages I'm trying > to use this on display 45 to 50 rows and IE performs sluggish. On a > full display page we include over 200 rows and that makes scrolling > with the mousewheel over the list all but unbearable and the > application of the style is sluggish once scrolling stops. Any ideas > how I could increase the performance in IE7 for this type of > application. > > James >