The mouse position at the time the event occurred, relative to the top left of the page.
typeThe type of the event (e.g. "click").
whichThe button or key that was pressed.
dataAny data that was passed in when the event was bound.
targetThe DOM element that initiated the event.
preventDefault()Prevent the default action of the event (e.g. following a link).
stopPropagation()Stop the event from bubbling up to other elements.
var $this = $(this);
Example 5.9. Triggering an event handler the right way
var foo = function(e) { if (e) { console.log(e); } else { console.log('this didn/'t come from an event!'); } }; $('p').click(foo); foo(); // instead of $('p').trigger('click')