off

nodeComponents. off

Source:

Removes the callback's associated with the given node. If no callback is provided, all callback associated with the event are removed.

Example

function clickCallback() {
  console.log('CLICKED');
}

$$$
.find('Cube_1')
.on('click', clickCallback)
.trigger('click') // logs 'CLICKED'
.off('click', clickCallback)
.trigger('click'); // no log

$$$
.find('Cube_1')
.on('click', clickCallback)
.trigger('click') // logs 'CLICKED'
.off('click') // all callbacks associated with `click` are removed