In the documentation for .on()
, the parameters are given as follows:
.on( events [, selector ] [, data ], handler )
With regards to the handler
parameter (i.e. the callback function):
handler
Type:
Function( Event eventObject [, Anything extraParameter ] [, ... ] )
A function to execute when the event is triggered. The value
false
is also allowed as a shorthand for a function that simply doesreturn false
.
When are any extraParameter
arguments passed to the callback function? There are a lot of aliases for .on()
but I haven't come across any that pass more than the eventObject
parameter.
There is an example in the documentation: