Mehul Prajapati
Explain .bind() vs .live() vs .delegate() vs .on()
By Mehul Prajapati in JQuery on Jan 07 2018
  • Bidyasagar Mishra
    Aug, 2019 11

    The jQuery .bind() method registers event type and an event handler directly to the DOM element.
    The live() method attaches the event handler to the root level of the document along with associated selector and the event information. This can also respond to the events which are generated by dynamically added elements.
    jQuery .delegate() method behaves in a similar way to the .live() method. But, instead of attaching the selector or event information to the document, you can choose where it is anchored. That is you can control on which node the events will be added. This can also respond to the dynamic element events.
    You can consider jQuery .on() method as being ‘overloaded’ with different signatures. This method attach the event handler function for one or more events to the selected elements. jQuery .on() function was included in jQuery 1.7 so, for early versions it will not work.

    • 0
  • Rupesh Kahane
    Sep, 2018 13

    1. https://www.c-sharpcorner.com/UploadFile/4aac15/difference-between-bindlivedelegatetrigger-in-jqu/ 2. https://elijahmanor.com/differences-between-jquery-bind-vs-live-vs-delegate-vs-on/ 3. https://www.dotnetcurry.com/jquery/1275/jquery-event-handling-difference-between-bind-live-delegate-on

    • 0

Most Popular Job Functions


MOST LIKED QUESTIONS

var $j = jQuery.noConflict();