Skip to main content
Version: 10.1

$.udb.on()

note

This article is about the on() function of the udb object.

$.udb.on()

Binds a handler to an event (in the same way as in the jQuery implementation).

Returns the 'this' object.

Syntax

.on( eventType, data, handler(event) )

The required eventType is a string that identifies the event to bind to. The possible values for the 'eventType' parameter are described in the Events reference section.

The optional data is a key-value map that contains certain data options to be passed to the event as its events.data object.

The optional handler(event) is a function that identifies the entry to be removed.

Example

function OnCommit(event,options){
if(options.success)alert('Succeeded!');
}
$.udb.on('postcommit',OnCommit);
$.udb.off('postcommit',OnCommit);