Javatpoint Logo
Javatpoint Logo

Backbone.js delegateEvents()

The Backbone.js delegateEvents method is used to bind the elements to the specified DOM with callback methods to handle events. This method can attach the events to the view if events are removed from the view.

Syntax:

Parameter explanation:

events : It specifies events that are needed for reattaching to the view.

Let's take an example.

See this example:

Test it Now

Output:

Save the above code in deligate.html file and open this file in a new browser.

BackboneJS deligate Model1

After clicking, you will get the following result:

BackboneJS deligate Model2




Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA