[jQuery] How to list the bound events?
Hi,
I am trying to debug a piece of code... I have bound a custom event to
an element, but when I try to call it via the trigger method, nothing
happens.
I thought it would be handy if I could get a list of all the events
that are bound to a particular element but I can't see how to do that.
Is it possible?
eg
$('#'+targetId).bind('modalClose', function(){
alert('modalClose');
});
...later...
$('#'+targetId).trigger('modalClose');
...nothing hapens!
how do I do something like this:
alert( $('#'+targetId).events );
cheers.