- Source:
Removes the callback's associated with the WebGL canvas element. If no callback is provided, all callback associated with the event are removed.
Example
function clickCallback() {
console.log('CLICKED');
}
$$$
.on('click', clickCallback)
.trigger('click') // logs 'CLICKED'
.off('click', clickCallback)
.trigger('click'); // no log
$$$
.on('click', clickCallback)
.trigger('click') // logs 'CLICKED'
.off('click') // all callbacks associated with `click` are removed