Get the element that triggered the event in an event handler function
A lot of people seem to get confused when trying to get the element that triggered the event in an event handler function. this or $(this) returns the parent element of the target.
Even before jQuery, vanilla JavaScript worked.
http://www.quirksmode.org/js/events_properties.html
Vanakkam !
Even before jQuery, vanilla JavaScript worked.
http://www.quirksmode.org/js/events_properties.html
JavaScript | Tuesday, December 17, 2019 |
0 comments:
Post a Comment