Answered: Selecting even table rows from a table element
- by mvrak
The issue I am having is:
How do I go from a variable pointing at an element to using CSS selectors?
I want to make this work:
function highlight(table)
{$(table " > :even").toggleClass('highlight');}
where table is a reference to a table element.
I don't want answers that tell me to use $('#table') because that defeats the point of the generality I am trying to make.
Thanks