Removes event listener from the object.
off(type, [handler])

type | string, name of the event
handler | function, JavaScript function (optional)

OR
off(eventData, handler)

eventData | object, parameters of the event
handler | function, JavaScript function

Returns undefined.

#### Description

You can remove a specific listener for a specific event, all listener for a specific event, or all listener for all events. For example, if you have a layout (same for grid, toolbar, etc.) defined as follows: $('#layout').w2layout({ name : 'layout', panels : [ { type: 'top', size: 40 }, { type: 'main', content: 'This is main panel' }, { type: 'preview', size: 200 } ] }); You can remove a specific event listener (note that the handler cannot be an anonymous function): w2ui['layout'].off('refresh', handler); All listeners for the event: w2ui['layout'].off('refresh'); All listeners for all events: w2ui['layout'].off('*');

#### Event Namespace

While adding an event listener, you can provide a namespace for the event: w2ui['layout'].on('render.myplugin', function (event) { console.log(event.target, event); }); w2ui['layout'].on('refresh.myplugin', function (event) { console.log(event.target, event); }); It provides you with a convenience to remove events listener in an easy way without specifying all events and functions they were registered with: w2ui['layout'].off('.myplugin')