Edit this page

up.viewport up.focus(element, )
JavaScript function

This feature is experimental. It may be changed or removed in a future version.

Focuses the given element.

Focusing an element will also reveal it, unless { preventScroll: true } is passed.

Parameters

element stringorElementorjQuery

The element to focus.

[options.preventScroll=false]

Whether to prevent changes to the acroll position.

This website uses cookies to improve usability and analyze traffic.
I accept or learn more