I have text inputs on cells in a table.
<table>
<tr>
<td>Bola</td>
<td>Casa</td>
<td>Arvore</td>
</tr>
<tr>
<td><input type="text" class='campo' /></td>
<td><input type="text" class='campo' /></td>
<td><input type="text" class='campo' /></td>
</tr>
</table>
When I type in one of them, I want to know if it's in column 1, 2 or 3. How can I achieve this?
$(".campo").on("input", function(){
// ?????
});