Edit this page

up.feedback .up-loading
HTML selector

While rendering with navigation feedback, targeted fragments are assigned the .up-loading class.

The .up-loading class is removed once the fragment was updated.


We have a fragment that we want to update:

<div class="foo">
  Old content

We now update the fragment with new content from the server:

up.render('.foo', { url: '/path', feedback: true })

While the request is loading, the targeted element has the .up-loading class:

<div class="foo up-loading">
  Old content

Once the response was rendered, the .up-loading class is removed:

<div class="foo">
  New content

Styling targeted fragments

To improve the perceived responsiveness of your user interface, consider styling loading fragments in your CSS:

.up-loading {
  opacity: 0.6;

If you're looking to style the link that targeted the fragment, use the .up-active class instead.