VOOZH about

URL: https://www.geeksforgeeks.org/jquery/jquery-event-data-property/

⇱ jQuery event.data Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

jQuery event.data Property

Last Updated : 11 Jul, 2025

jQuery event.data property is used to contain the optional data which is passed to an event method. The data is passed when the currently executing handler is bound. 

Syntax:

event.data

Parameters:

  • event: It is the parameter that is used to specify the name of the event type on the selector.

Example 1: The below example illustrates the event.data method in jQuery.

Output:

👁 Image

Example 2: In this example, the message will show in the output box when either box is clicked.

Output:

👁 Image
Comment

Explore