selecting sibilings after a variable position in a list
I tried to make the title s meaningful as possible. I am trying to select n number of sublings in a list of elements after a specified point.
I have a table with a number of rows (tr) and each row has a link and a checkbox. On clicking the link, I want to check the checkbox on that row and for the next 5 (say) rows but not the previous ones.
Something like this...
<table>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
<tr>
<td><a>Link</a></td>
<td><input type="checkbox"></input></td>
</tr>
</table>