If you omit a parameter to a callback function, it still works. For example,
var callback1 = function() {
$("span").prepend("Callback 1: " + event.pageX + " " + event.pageY + "<br>");
};
$("div").click(callback1);
works when the event
parameter is not passed. It seems equivalent to:
var callback2 = function(event) {
$("span").prepend("Callback 2: " + event.pageX + " " + event.pageY + "<br>");
};
$("div").click(callback2);
with the parameter passed as I feel it should be.
Working JSFiddle of this here.
I found this JS phenomenon peculiar. Why does it work?