Getting the ID of the element that fired an event

Code Example - Getting the ID of the element that fired an event

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