.on()

Previous Next

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 USoft Events 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);

 

 

See Also

.off()