I've seen this question, but mine is a little bit different.
Take the following HTML:
<tr>
<td>
<select id="show">
<option>Show</option>
<option>Don't show</option>
</select>
</td>
</tr>
<tr class="basedOnSelect">
<!-- stuff here -->
</tr>
As implied, I want to show the second tr
based on which option is selected in the show
select
element. I can do this in JavaScript, but I have seen little CSS hacks to do similar things based on check boxes in pure CSS.
The problem in my case appears to be that the select
is too far down the tree to use sibling selectors to get the desired tr
, and there is still no "parent" selector to use.
Is this possible?