Edit this page

up.event up.off([element], types, listener)
JavaScript function

Unbinds an event listener previously bound with up.on().

Example

Let's say you are listing to clicks on .button elements:

var listener = function() { ... }
up.on('click', '.button', listener)

You can stop listening to these events like this:

up.off('click', '.button', listener)

Observed events

[element=document]
optional

The element from which to unbind the listener.

types
required

The event types to unbind.

Multiple event types may be passed as either a space-separated string ('foo bar'), a comma-separated string ('foo, bar') or as an array of types (['foo', 'bar']).

stringFunction(): string

Listener

listener
required

The listener function to unbind.

You must pass a reference to the same function reference that was used to register the listener.

Function(event, [element], [data])