jquery - Alternate row colors with exceptions -
jquery - Alternate row colors with exceptions - i have table rows hidden. show them, on demand. user must perform action display rows. each hidden rows has class="hideme" withing tr tag. i add together class alternating rows, alter color, visible. it's simple, i'm not sure how incorporate hidden rows exception. $('.mytable tr:odd:not(hideme)').addclass('altrow'); can done css or need throw in jquery magic? actually, tweaking "a little" code, nice solution: $('.mytable tr:not(.hideme):odd').addclass('altrow'); see working here: http://jsfiddle.net/hyhwj/ another solution : $('.mytable tr:not(.hideme)') .removeclass('altrow') .filter(':odd') .addclass('altrow'); see working here: http://jsfiddle.net/r4n5g/ jquery css