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
</div>
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
</div>
Once the response was rendered, the .up-loading
class is removed:
<div class="foo">
New content
</div>
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.