Attaches the callback associated with the given node.
- Source:
Example
function clickCallback() {
console.log('CLICKED');
}
$$$
.find('Cube_1')
.on('click', clickCallback)
.click() // `click` the node and also logs 'CLICKED'
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
object | The event for the callback. |
|
callback |
function |
<optional> |
The specific callback to attach to the |
Returns:
- Chainable api by returning the node.
- Type
- self