[EMAIL PROTECTED] ha scritto:
The following code works fine on small tables:

$("table tbody tr").mouseover(function(){$(this).addClass("over");}).mouseout(function(){$(this).removeClass("over");});

But on tables with 5,000-10,000 rows, it throws the "A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue."

Can anyone suggest a workaround?

Thanks

You could try event delegation:
$("table tbody").mouseover(function(e){
        if(e.target).is("tr")
                $(e.target).addClass("over");
}).mouseout(function(e){
        if(e.target).is("tr")
                $(e.target).removeClass("over");
})

Renato

Reply via email to