How to have only one keypress event so it can be triggered by any child element in the DOM tree.
For example I have something like this:
<table>
<tr>
<td><input type="text" id="col_1" value="1"/></td>
</tr>
<tr>
<td><input type="text" id="col_2" value="2"/></td>
</tr>
<tr>
<td><input type="text" id="col_3" value="3"/></td>
</tr>
</table>
So for example when user changes the value on id=col_3 and then on id=col_2 how can I distinguish which input triggered this event? I need to be able to save and input id and the value of it in an array so I can read it later on.