Edit this page

up.layer up.modal.extract(selector, document, options)
JavaScript function

This feature has been deprecated. Use up.layer.open({ document, mode: "modal" }) instead.

Load unpoly-migrate.js to polyfill deprecated features.

Extracts the given CSS selector from the given HTML string and opens the results in a modal overlay.


Parameters

selector
required

The CSS selector to extract from the HTML.

string
document
required

The HTML containing the modal content.

string
options
required

See options for up.modal.follow().


Return value

A promise that will be fulfilled when the modal has been opened.