How can I check which event called my function on JavaScript with jQuery?
Like I have:
var mycall= function() {
alert('Which Witch is Which?');
}
$(window).load(mycall);
$(window).resize(mycall);
I understand that I could pass a parameter to the function, still I’m interested in a way to do this without passing any parameters.
Add an event to the function args and then
event.typewill give tell which event is triggered. See below,