Skip to content
Karl edited this page Nov 9, 2017 · 22 revisions

Selectable fires a number of custom events that the end-user can listen for.

To do so just call the on() method and pass the event name and a callback as the first two arguments:

const selectable = new Selectable(options);

// Listen for the 'selectable.XXXX' event
selectable.on('selectable.XXXX', function(/* params */) {
    // Do something when 'selectable.XXXX' fires
});

Event listeners can be removed by calling the off() method with the name of the event:

selectable.off('selectable.XXXX');

Event reference

Clone this wiki locally