event.data

event.data

event.dataReturns: Object

Description: An optional object of data passed to an event method when the current executing handler is bound.

  • version added: 1.1event.data

Example:

Within a for loop, pass the value of i to the .on() method so that the current iteration's value is preserved.

<!doctype html>
<ht