# Form Events
focus => 1,
+ # Generic Event Handling ## pattern: $(<TARGET>).<FUNCTION>(<ARG1>, kivi.get_function_by_name(<ARG2>))
+ on => 3,
+ off => 3,
+ one => 3,
+
# ## jqModal plugin ##
# Closing and removing the popup
- jqmClose => 1,
+ jqmClose => 1, # $(<TARGET>).jqmClose()
# ## jstree plugin ## pattern: $.jstree._reference($(<TARGET>)).<FUNCTION>(<ARGS>)
C<focus>
+=item Generic Event Handlers
+
+C<on>, C<off>, C<one>
+
+These attach/detach event listeners to specific selectors. The first
+argument is the selector, the second the name of the events and the
+third argument is the name of the handler function. That function must
+already exist when the handler is added.
+
=back
=head2 JSTREE JQUERY PLUGIN
// Form Events
else if (action[0] == 'focus') $(action[1]).focus();
+ // Generic Event Handling ##
+ else if (action[0] == 'on') $(action[1]).on(action[2], kivi.get_function_by_name(action[3]));
+ else if (action[0] == 'off') $(action[1]).off(action[2], kivi.get_function_by_name(action[3]));
+ else if (action[0] == 'one') $(action[1]).one(action[2], kivi.get_function_by_name(action[3]));
+
// ## jqModal plugin ##
// Closing and removing the popup