jQuery & jQuery UI Documentation

jQuery & jQuery UI

event.data

event.data Returns: Anything

Description: The optional data passed to jQuery.fn.bind when the current executing handler was bound.

  • version added: 1.1event.data

Example:

The description of the example.

$("a").each(function(i) {
  $(this).bind('click', {index:i}, function(e){
     alert('my index is ' + e.data.index);
  });
});