Edit this page

up.layer a[up-layer=new]
HTML selector

Follows this link and opens the result in a new overlay.

Example

<a href="/menu" up-layer="new">Open menu</a>

Modifying attributes

All attributes for a[up-follow] may also be used.

You may configure default layer attributes in up.layer.config.

[up-layer="new"] string optional

Whether to stack the new overlay onto the current layer or replace existing overlays.

See replacing existing overlays.

[up-mode] optional

The kind of overlay to open.

See available layer modes.

[up-size] optional

The size of the overlay.

See overlay sizes for details.

[up-class] optional

An optional HTML class for the overlay's container element.

See overlay classes.

[up-history] optional

Whether history of the overlay content is visible.

If set to true the overlay location and title will be shown in browser UI.

If set to 'auto' history will be visible if the initial overlay content matches a main target.

[up-dismissable] optional

How the overlay may be dismissed by the user.

See customizing dismiss controls for details.

You may enable multiple dismiss controls by passing a space-separated string.

Passing true or false will enable or disable all dismiss controls.

[up-animation] optional

The name of the opening animation.

[up-on-opened] optional

A JavaScript snippet that is called when the overlay was inserted into the DOM.

The snippet runs in the following scope:

Expression Value
this The link that opened the overlay
layer An up.Layer object for the new overlay
event An up:layer:opened event
[up-on-accepted] optional

A JavaScript snippet that is called when the overlay was accepted.

The snippet runs in the following scope:

Expression Value
this The link that originally opened the overlay
layer An up.Layer object for the accepted overlay
value The overlay's acceptance value
event An up:layer:accepted event

With a strict Content Security Policy additional rules apply.

[up-on-dismissed] optional

A JavaScript snippet that is called when the overlay was dismissed.

The snippet runs in the following scope:

Expression Value
this The link that originally opened the overlay
layer An up.Layer object for the dismissed overlay
value The overlay's dismissal value
event An up:layer:dismissed event

With a strict Content Security Policy additional rules apply.

[up-accept-event] optional

One or more space-separated event types that will cause this overlay to automatically be accepted when a matching event occurs within the overlay.

The overlay result value is the event object that caused the overlay to close.

See Closing when an event is emitted.

[up-dismiss-event] optional

One or more space-separated event types that will cause this overlay to automatically be dismissed when a matching event occurs within the overlay.

The overlay result value is the event object that caused the overlay to close.

See Closing when an event is emitted.

[up-accept-location] optional

One or more space-separated URL patterns that will cause this overlay to automatically be accepted when the overlay reaches a matching location.

The overlay result value is an object of named segments matches captured by the URL pattern.

See Closing when a location is reached.

[up-dismiss-location] optional

One or more space-separated URL patterns that will cause this overlay to automatically be dismissed when the overlay reaches a matching location.

The overlay result value is an object of named segments matches captured by the URL pattern.

See Closing when a location is reached.

[up-context] optional

The new overlay's context object, encoded as JSON.

[up-position] origin optional

The position of the popup relative to the `` element that opened the overlay.

Supported values are top, right, bottom and left.

See popup position.

[up-align] position optional

The alignment of the popup within its ``.

Supported values are top, right, center, bottom and left.

See popup position.

This website uses cookies to improve usability and analyze traffic.
I accept or learn more