How to detect all events added on a div
I am new to jQuery and such kind of js frameworks. Till now I used to do like this
But in jQuery we get the element and add the event there. How can I detect all events added on a div?
Any help is highly appreciated.
To answer your question you can use:
jQuery._data( elem, "events" );
This will become an object of all events attached to the selected element.
This will return
undefined when no event is attached to the element.
Note that this should be a single element, so for a class you should use:
Which only select the first element with that class, instead of all the elements with that class.