I have a form that has multiple input fields. I’m applying a bind() to this form as so:
$("#form-id").bind('keyup change', function(e) {
//Run some other code
alert('here');
});
I would like to determine the ID of which form field triggered the bind event to fire. I’ve tried working with the Event object sent on the function, however the information doesn’t seem to reside there. For example, e.relatedTarget is null.
Is is possible to determine what child element of the form triggered the bind event to be triggered?
Use the event
target:Here’s a working example.