I need to access to tr element in table.
I have 3 colums and in last column have checkbox. In event on change I have code:
alert( $(this).parent().parent().html() );
Which get all 3 td elements, but I need it with tr parent tag.
I tried:
alert( $(this).parent().parent().parent().html() );
alert( $(this).parent().parent().prev().html() );
And doesn't work.
HTML:
<table>
<thead bgcolor="#668c41">
<tr>
<th>App</th>
<th>Server</th>
<th>Action</th>
</tr>
</thead>
<tbody id="dialog-app">
<tr>
<td>appA</td>
<td>serverA</td>
<td><input checked="" type="checkbox"></td>
</tr>
</tbody>
</table>