In jquery, event.target.id always refers to the element that triggers the event (or selected event). Sample below
$(document).ready(function() {
$("a").click(function(event) {
alert(event.target.id);
});
});
thanks, you save me hours :)
ReplyDelete