I have a table with some rows hidden. I do show them, but on demand. A user must perform an action to display those rows. Each hidden rows has class=”hideMe” withing TR tag.
I would like to add a class to alternating rows, to change color, but only to those that are always visible. Normally it’s simple, but I’m not sure how incorporate hidden rows exception.
$('.myTable tr:odd:not(hideMe)').addClass('altRow');
Can it be done with just CSS or do I need to throw in some jQuery magic?
Actually, tweaking just “a little” your code, you get a nice solution:
See it working here: http://jsfiddle.net/HYHWJ/
Another solution would be :
See this working here: http://jsfiddle.net/r4N5g/