JQuery.toggle () is extremely slow for many <TR> elements
I have a table like this:
<table>
<tr class="a"><td></td></tr>
<tr class="b"><td></td></tr>
</table>
There are about 800 lines and most of them are class a. Now I want to switch these lines as follows:
$("#toggle_a").click(function(){
$("tr.a").toggle();
});
$("#toggle_b").click(function(){
$("tr.b").toggle();
});
But it is really very slow, and most of the time the browser wants to stop the action.
Does anyone have an idea how to make this thing faster and more useful?
+5
4 answers