I have a following html:-
<button type="button" class="btn-add">
<i class="some-icon"></i>
</button>
which creates a nice fancy button with an icon
I bound an event on the button click:-
function (e) {
console.log($(e.target));
}
now when i click on the center of the button the output of the above javascript is <i>
element because of e.target. Is there any other way to get the actual control that fired this event, in this case the <button>
?