I have the following code:
$(\'#button\').on(\'click change\', function() {
alert(\'Who fired me, click or change?\');
});
How can I kn
@Vega solution is correct for simple events. However, if you namespace your events, (i.e. player.play) then you must get the namespace as well. For example, lets say I trigger the event:
$('#myElement').trigger('player.play');
Then to get the full event name, you need to do the following:
$('#myElement').on('player.play', function(e) {
console.log('Full event name: ' + e.type + '.' + e.namespace);
});