back to Overview


Triggers event handlers registered with on.
Web module only.

Syntax Variants

list.trigger(name, eventObject)


a single event name to trigger
eventObj (optional)
an object to pass to the event handler, provided the handler does not have custom arguments. Anything you pass here will be directly given to event handlers as event object, so you need to know what they expect.
(return value)
the list


Triggers event handlers registered with on(). Any event that has been previously registered using on() can be invoked with trigger(). Please note that it will not simulate the default behavior on the elements, such as a form submit when you click on a submit button. Event bubbling is supported, thus unless there's an event handler that cancels the event, the event will be triggered on all parent elements.


Simulates a 'click' event on the button.


See also..

  • on() registers events that can be triggered.


comments powered by Disqus

back to Overview