Edit this page

up.link [up-instant]
HTML selector

Activates this link-like element on mousedown instead of click ("Act on press").

For links with [up-follow] this will save some time that would otherwise be spent on waiting for the user to release the mouse button. Since an AJAX request will be triggered right way, the interaction will appear faster.

For faux-interactive elements setting [up-instant] will cause the up:click event to be emitted on mousedown instead of click.

To apply the instant effect without changing your HTML, configure up.link.config.instantSelectors.

Example

<a href="/users" up-follow up-instant>User list</a> <!-- mark: up-instant -->

Accessibility

Links or faux-interactive elements with [up-instant] can still be activated with the keyboard.

With [up-instant] users can no longer cancel a click by dragging the pressed mouse away from the elements. However, for navigation actions this isn't required. E.g. many operation systems switch tabs on mousedown instead of click.