Remove an event handler.
$('button').off('click');
// All 'click' listeners are removed from buttons.
function onClick() { console.log('Clicked'); }
$('button').on('click', onClick);
$('button').off('click', onClick);
// Specifically removes the `onClick` listener.
// Other click listeners remain intact.
$('button').off('click.myPlugin');
// Removes only click events with namespace "myPlugin".
| Parameter | Type | Description |
|---|---|---|
| eventType | string | One or more space-separated event types. |
| selector | string | Optional. A selector which should match the one originally passed to .on(). |
| handler | function | Optional. A handler function previously attached for the event(s). |
Returns: The original SR object for chaining.