Reputation: 1680
I have been using the following with no problems:
$("#tableid tr:even").addClass("evenClass");
But now I have rows in my table that are hidden which messes up the zebra striping styles. I have tried add 'is(":visible")' and things like that to no avail. Any ideas?
Upvotes: 2
Views: 2765
Reputation: 342795
Try adding the :visible
pseudo-selector:
$("#tableid tr:visible:even").addClass("evenClass");
Demo: http://jsfiddle.net/gRyFx/1/
Upvotes: 11