Edit this page

up.status [up-placeholder]
HTML selector

This feature is experimental. Please share your experiences so we know what to keep or change.

Links or forms can define a placeholder that will be shown within the targeted fragment while loading content from the server.

All other children of the targeted fragment will be hidden while the request is in flight. When the requests ends for any reason, the placeholder will be removed and the original fragment children will be un-hidden.

When targeting multiple fragments, the placeholder will be shown in the first fragment.

Example

This link will show the message "Loading…" within #target while its request is loading:

<a href="/path" up-target="#target" up-placeholder="<p>Loading…</p>">Show story</a> <!-- mark-phrase "<p>Loading…</p>" -->

<div id="#target">
  Old content
</div>

See Placeholders for details and elaborate examples.


Modifying attributes

up-placeholder

The HTML string for the placeholder.

You can also use a template by setting this attribute to a CSS selector matching a <template> or <script> element.