Edit this page

up.fragment up.replace(target, url, [options])
JavaScript function

This feature has been deprecated. Use up.render() or up.navigate() instead.

Load unpoly-migrate.js to polyfill deprecated features.

Replaces elements on the current page with corresponding elements from a new page fetched from the server.


Parameters

target
required

The CSS selector to update. You can also pass a DOM element or jQuery element here, in which case a selector will be inferred from the element's class and ID.

url
required

The URL to fetch from the server.

string
[options]
optional

See options for up.render().


Return value

A promise that fulfills when the page has been updated.