Need a special offer?Find out if your project fits.
+
All documentation
API reference
  • API Reference for older versions
  • off

    off(eventName: String, functionName: Function)

    [starting from version: 2.3]

    Removes JS handlers for specified event.

    Parameters

    Parameter/Type Description
    eventName
    String
    The name of the component's event.
    functionName
    Function
    optional The JS handler to remove. If not specified, all handlers will be removed for the event.

    Examples

    //remove all handlers for 'cellclick' event 
    flexmonster.off('cellclick');

    //add handler for 'cellclick' event
    flexmonster.on('cellclick', onCellClick);

    function onCellClick(result) {
    alert('The cell is clicked');
    }

    //remove specified handler for event
    flexmonster.off('cellclick', onCellClick);

    //note that if you added the listener the following way:
    flexmonster.on('celldoubleclick', function () {
    alert('The cell is double clicked');
    });
    //it is impossible to remove such listener by name,
    //so the only option here is to remove all the handlers by calling:
    flexmonster.off('celldoubleclick');

    Check the example on JSFiddle.

    See also

    on
    list of events