what events are bound?
Is there any way to see what events are bound to an开发者_StackOverflow element with jQuery?
If you are using Safari or Chrome, you can open up the Developer Tools
and inspect the element (by clicking the magnifying glass). In the Event Listeners
tab on the right it will tell you the binded events to that element, with their functions and locations.
OR to do this via code:
$('selector').data('events'); // get
console.dir($('selector').data('events')); // display in firefox firebug or webkit's developer tools
This solution is obsolete in new jQuery versions. You must use:
$._data($('selector')[0],'events')
If you don't need this in script, you can check that element in any DOM inspection tool like Firebug and see all events.
精彩评论