trigger

Given a node, trigger the associated event.

Source:
Example
function clickCallback() {
  console.log('RANDOM EVENT');
}

$$$
.find('Cube_1')
.on('sampleEvent', clickCallback)
.trigger('sampleEvent') // logs 'RANDOM EVENT'
Parameters:
Name Type Description
event object

The event for the callback.

Returns:
  • Chainable api by returning the node.
Type
self