Home » Backbone.js On()

Backbone.js Event on()

The Event on method is used to bind an event to an object and callback function. It executes the callback function whenever an event is fired.

Syntax:

Parameter explanation:

event:It is used to bind an object.

callback:It is executed whenever an event is fired. It references to the code.

context: It is an object that can be passed to a callback function.

Let’s take an example.

See this example:

You may also like