Given the following table structure, how would I get all the input shafts in the table when clicked .button?
<table>
<tr>
<td><input value="1" name="A" type="text" /><td>
</tr>
<tr>
<td><input value="2" name="B" type="text" /><td>
</tr>
<tr>
<td><input value="3" name="C" type="text" /><td>
</tr>
<tr>
<td><div class="button"></div><td>
</tr>
</table>
This is the jquery that I have so far:
$('.button').click(function() {
alert($(this).parent('table').('input').serialize());
});
The function does not work, although it does not find the input in the table, I think ...
kylex source
share