Is there a way to say on any event fire
$('#foo').bind('click', function() {
alert($(this).text());
});
I am trying to test a piece of code for a certain event and not going in there. Just want it to fire fore ANY event.
$('#foo').bind('ANY', function() {
alert($(this).text());
});
There’s no shorthand for listening to all events.
The closest thing you can get out of the box would be specifying them manually:
Note that plugins may fire their own events, perhaps namespaced. You can’t listen to these events without knowing them and manually specifying them.