Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
100
rated 0 times [  104] [ 4]  / answers: 1 / hits: 41266  / 14 Years ago, tue, november 9, 2010, 12:00:00

Is there a way to list all bindings on a jQuery element? jQuery's bind() does only seem to attach them and I didn't find a jQuery function that does get the bindings.


More From » jquery

 Answers
12

This answer applies to jQuery version < 1.8



Best way to do that, probably the FireQuery plugin for FireFox. Really a neat tool.



If you want/need to accomplish that in-code, use jQuerys .data('events') object.



$.each($('#element').data('events'), function(i, e) {
console.log(i, e);
});


All events that were bound via jQuery gets pushed into that object. Of course, there might also be other event handlers like on-anything, for which you would have to check explicitly.



Ref.: FireQuery


[#95032] Saturday, November 6, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
zaynerogerb

Total Points: 454
Total Questions: 109
Total Answers: 97

Location: Comoros
Member since Tue, Mar 14, 2023
1 Year ago
zaynerogerb questions
;