Martyn Ball Martyn Ball - 1 month ago 9
jQuery Question

List event listeners of element

Trying to list the event listeners on a website with the following code:

$( document ).ready(function() {
var s = $._data($('.group4.cboxElement')[0], "events")

However getting
on the

This is the website, I need to see what event listeners are attached to the
links in the Gallery tab.

Can someone tell me how to listen the events attached, or remove them that would be great.

Browser: Chrome


There's no official API for doing this.

If your goal is just to do this as part of debugging, Chrome itself can show you the event listeners attached to an element at the DOM level, see this question and its answers, and there are Chrome extensions (like this one) that can show you the jQuery event handlers as well (since jQuery maintains its own list of handlers, using only a single handler per event per element).