So, I have two objects:
- A table with a number of rows and columns. One of these columns is called “Builder”
- A dropdown containing all the possible “Builders” that could be in the table
What I want to do is have conditional CSS such that when you select “Builder X” in the dropdown, all rows containing “Builder X” are hilighted.
My initial plan was to dynamically give each row a class based on its builder (which I’ve done), and then modify the CSS when you change the option in a dropdown (which I can’t figure out how to do properly).
Here’s a (borderline useless) Fiddle that shows the situation I’m in: http://jsfiddle.net/convoke/bTM6D/8/
Conversely, if there’s a smarter/better way to do this, I’m open to hear it.
Try this jsFiddle, should start you out:
http://jsfiddle.net/Bchgu/