The event.data property is used to contain the optional data which is passed to an event method. The data passed when the currently executing handler is bound.
- event: It is the parameter which is used to specify the name of the event type on the selector.
Return Value: This method returns an Object.
Example: Below example illustrates the event.data method in jQuery:
After Clicking 1st alert box:
After Clicking 2nd alert box:
After Clicking 3rd alert box:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.