Edit this page

up.fragment :layer
HTML selector

This feature is experimental. It may be changed or removed in a future version.

Your target selectors may use this pseudo-selector to replace the layer's topmost swappable element.

The topmost swappable element is the first child of the layer's container element. For the root layer it is the <body> element. For an overlay it is the target with which the overlay was opened with.

In canonical usage the topmost swappable element is often a main element.

Example

The following will replace the <body> element in the root layer, and the topmost swappable element in an overlay:

up.render(':layer', { url: '/page2' })