Wednesday, December 19, 2018

jquery - Get all event listeners that are on an object in javascript

One tricky way is to use jQuery's internal function _data() to get these :


var element = document.querySelector('#its-your-thing'),
list_of_events = $._data(element, "events");

Careful thought, I do not have information about its behavior across versions (working at least in 1.9.0)

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...