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
No comments:
Post a Comment