🚨 $100K in Sight: Follow Bitcoin’s Final Push Live! TRACK NOW

Code has been added to clipboard!

jQuery Event Type: Learn to Get Types of Events

Reading time 1 min
Published Jan 8, 2018
Updated Oct 10, 2019

jQuery Event Type: Main Tips

  • The jQuery get types of events property is commonly applied to indicate specific events.
  • The event.type returns a string, representing the type of the specified event.

Usage of event.type

The event.type property returns the event type. The following example tracks cursor movements within the element and indicates when mouseout, mouseover, click and dblclick events occur:

Example
$("p").on("mouseout mouseover dblclick click", (event) => {
    $("div").html("Event: " + event.type);
});

Note: jQuery event types are set when events are created.