I have a large table and allow the user to hide rows based upon a lot of complicated rules.
I also have a ‘reset’ button that is to reveal all the rows back again, but it is running very slowly:
$('#myTable tbody tr').show('fast');
Q: Is there a fast way to show table rows that have been previously hidden with the hide method?
Perhaps I should add class=”hide” and removeClass instead.
You just want to show the ones that are hidden, not the whole set, also if the
tr‘s are direct childs oftbodyis faster to use the child selector, so try this:if after trying that, it’s still slow for you, you could try with the viewport plugin to only animate those that are actually shown in screen, like so:
UPDATE:
Updated to add direct child selectors.