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.

Latest Coupon Found:

Verified STAFF PICK

TOP-RATED CODING COURSES

Learn the skills of tomorrow

The best time to learn programming is now - follow this link to access 100+ coding courses and enjoy learning at a very low cost!

Expiration date: 15/05/2021
2287 People Used
Only 92 Left
Rating
5.0