top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is Delegate() and Trigger() in Jquery?

0 votes
30 views
What is Delegate() and Trigger() in Jquery?
posted May 25 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

Delegate
The delegate() method attaches one or more event handlers for specified elements that are children of selected elements and specifies a function to run when the events occur.

Event handlers attached using the delegate() method will work for both current and FUTURE elements

Note: It's deprecated in Version 3. Please start using on() instead.

Trigger
The trigger() method triggers the specified event and the default behavior of an event (like form submission) for the selected elements.

This method is similar to the triggerHandler() method, except that triggerHandler() does not trigger the default behavior of the event.

answer Nov 30 by Nikita Sehgal
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...