Javatpoint Logo
Javatpoint Logo

jQuery delegate()

The delegate () method is used to attach one or more event handlers for specified elements which are the children of selected elements. This method executes a function to run when the event occurs.

The attached event handlers with the delegate () method works for both current and future elements.

Syntax:

Parameters of jQuery delegate() event

Parameters Description
ChildSelector It is a mandatory parameter that is used to specify one or more child elements to attach the event handler.
Event It is also a mandatory parameter. It specifies one or more events to attach to the elements. If you use multiple events then they must be separated by space.
Data It is optional and specifies additional data to pass along to the function.
Function It is executed when the event occurs.

Let's take a jQuery delegate () example.

Test it Now
Next TopicjQuery html()




Let's Work Together!

Javatpoint is passionate to offer better content to the world. Please mail your contribution to contribute@javatpoint.com. We will show your name and create your user profile. You can contribute the following things:
  • Article on Any Topic (which is not available on Javatpoint)
  • Your Interview Experience on Company
  • Company Interview Questions with Answers
  • Recruitment Process of Company
  • Programs, and Algorithm
  • Videos
  • Test Paper
  • Improve Article

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials