Edit this page

up.Preview up.Preview.prototype.hide([element])
Instance method

Temporarily hides an element.

The element will be shown when the preview ends.

Tip

To visually remove elements during a preview, prefer hiding over detaching. See Prefer additive changes.

Example

This preview hides an element #nav while the request is loading:

up.preview('hide-nav', function(preview) {
  preview.hide('#nav')
})

Parameters

[element=this.fragment] Element|string optional

The element or selector to change.

If omitted, the targeted fragment will be changed.