Hiding page elements based on form "select"
Lets say I have a select in a form...
- <select name="selector" id="selector">
- <option value="1">Option 1</option>
- <option value="2">Option 2</option>
- <option value="3">Option 3</option>
- </select>
I want to show and hide some table rows based on the option selected so that the following table...
- <tr id="row1">Some Content</tr>
- <tr id="row2">Some Content</tr>
- <tr id="row3">Some Content</tr>
will only show the row corresponding to the selected option.
I know I can use $("#
selector").val() to get the value of the select box but I'm not sure how to use that value to do anything useful...