View all events

by on

If you’ve worked with jQuery’s live() method, you’ve probably asked yourself how you can view all currently bound events. I banged my head around for a while before I noticed this little gem in the jQuery live() documentation:

.live() binds a special handler to the root of the DOM tree

jQuery stores all event data in the .data(“events”) object on a DOM element. So in this case, we can just call $(document) (the DOM root) to get what we want:


And that’s all there is to it.

Comments are closed.