Edit this page

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

Navigates to the given URL by updating a major fragment in the current page.

up.navigate() will mimic a click on a vanilla <a href> link to satisfy user expectations regarding scrolling, focus, request cancelation and many other side effects. To update a fragment without side effects, use up.render().

Instead of calling up.navigate() you may also call up.render({ navigate: true }).


Parameters

[target] stringorElementorjQuery optional

The target selector to update.

If omitted a main target will be rendered.

You can also pass a DOM element or jQuery element here, in which case a selector will be derived from the element attributes. The given element will also be set as the { origin } option.

Instead of passing the target as the first argument, you may also pass it as { target } option.

[options.url] string optional

The URL to navigate to.

[options] Object optional

See options for up.render().

Return value

A promise that fulfills with an up.RenderResult once the page has been updated.

For details, see return value for up.render().