I have a table like this:
<table>
<tr>
<td><input type="button" title="Toggle" value="Show" id="btn534534" class="toggle" /> </td>
<td>some data about ID 534534</td>
</tr>
<tr id="row534534" class="hiddenRow">
<td colspan="2">some hidden data about ID 534534 that must show/hide with toggle</td>
</tr>
<tr>
<td><input type="button" title="Toggle" value="Show" id="btn2423434" class="toggle" /></td>
<td>some data about ID 2423434</td>
</tr>
<tr id="row2423434" class="hiddenRow">
<td colspan="2">some hidden data about ID 2423434that must show/hide with toggle</td>
</tr>
<!-- many more rows here -->
</table>
There are MANY "sets" of rows like the above. One row of the table is visible for each "set" of rows. The second row with class "hiddenRow" is hidden on page load by JQuery like this:
$("tr.hiddenRow").hide();
Now I want each button to toggle visibility of the row immediately after it. Note that the INPUT in the visible row, and the TR of the hidden row share a unique ID. I want to have the button onclick call a JQuery function and pass the ID so that JQuery knows which row to toggle.
Any ideas? I can't find any examples of this online.