Custom events

Previous Next

In addition to the USoft predefined events, you can create custom events.

You must set, trigger and remove custom events yourself, using the appropriate .on(), .off() and .trigger() functions. Options can be passed to custom events by using the options parameter in the same way as with predefined events.

In the following examples, a custom event called "myevent" is used.


Example 1

$("#input").on("myevent", function(evt, options) {

  alert("This is a custom event on a UI element"); 






Example 2

$.udb.on("myevent", function(evt, options) {

  alert("This is a custom event on the $.udb object"); 






Example 3

$.udb("EMP").on("myevent", function(evt, options) {

  alert("This is a custom event on the EMP data source"); 






See also

Top-level Events

Data Source Events

Control Events