Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can I detect in Jquery if an element has a binding? [duplicate]

Possible Duplicate:
test if event handler is bound to an element in jQuery

I have a button with a fairly large script attached to it. I'm binding to this button like so:

 $(document).on( "click", '.basketSubmitter' , function(e) {

 ... stuff

 });

I can't pin it down, but sometimes the button looses it's binding = I click all I want and nothing happens. The buttons sitting left and right continue to work fine, so there must be something with the button being unbound somewhere. Script is large, so

Question:
Is there an easy way to list an elements binding or to detect when an element looses bindings in Jquery?

Thank!

like image 571
frequent Avatar asked Dec 06 '25 02:12

frequent


1 Answers

This tool will help you to find out the binded events to any DOM element

http://www.sprymedia.co.uk/article/Visual+Event+2

It's good if you want to inspect the dom to find binded events..

like image 151
udidu Avatar answered Dec 08 '25 15:12

udidu