Did you find this useful?
Socialize it today.

jQuery Type Event

Saturday, June 23, 2012

The jQuery event type property will return, when the event is triggered, which event type was triggered.



eventSpecifies the event to check.


In the following jQuery example, the type event can be used to access information about when an event is triggered. Try clicking, double-clicking, and hovering over the mouse icon below. The results will be displayed in the div element next to the mouse icon.

<!DOCTYPE html>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  $("#imgMouse").bind("click dblclick mouseover 
      mouseout mousedown", function (e) {
<div id="div1">Click the mouse icon to the left!</div>

The last event the mouse triggered was (waiting on first event).

Please help us spread the word by socializing it today!

email contact us

Did you find something wrong with the information on this page? Please take a moment to report it to us so that we can continue to improve the quality of the information on this site. Click here to report an issue with this page.

Recommended Books & Training Resources

Pro jQuery HTML CSS and JavaScript Editor Professional jQuery