Getting the ID of the element that fired an event

74

Getting the ID of the element that fired an event -

$(document).ready(function() {
    $("a").click(function(event) {
        alert(event.target.id);
    });
});

Comments

Submit
0 Comments