Edit this page

up.layer up.layer.on(types, [selector], [options], listener)
JavaScript function

Listens to a DOM event that originated on an element contained by the current layer.

This is a shortcut for up.layer.current.on(). See up.Layer#on() for more documentation.


Parameters

types string|Array<string>

The event types to bind to.

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']).

[selector] string|Function(): string optional

The selector of an element on which the event must be triggered.

[options] Object optional
listener Function(event, [element], [data])

The listener function that should be called.

Return value

Function()

A function that unbinds the event listeners when called.