jQuery API

event.type

event.type Returns: String

Description: Describes the nature of the event.

  • version added: 1.0event.type

Example:

On all anchor clicks, alert the event type.

$("a").click(function(event) {
  alert(event.type); // "click"
}); 

Support and Contributions

Need help with event.type or have a question about it? Visit the jQuery Forum or the #jquery channel on irc.freenode.net.

Think you've discovered a jQuery bug related to event.type? Report it to the jQuery core team.

Found a problem with this documentation? Report it on the GitHub issue tracker

  • M Prakash

    event.type not working in firefox

  • Theborisedu

    what other even types are there?

  • Theborisedu

    what other even types are there?

  • http://twitter.com/legolin Adam Elhardt

    @Theborisedu: Both DOM events and custom (user-defined) events that you trigger via .trigger(). DOM events look like click, mouseover, mouseout, submit, keypress, etc. A google search will give you the complete list.