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.