Search.../

scrollTo( )

Note: This standard element function is not relevant for Chatbox.

Description

Scrolls the page to the element using an animation.

The scrollTo() function returns a Promise that is resolved when the animated scroll is complete and the element is now in view.

To scroll to a specific location on the page, see the wix-window-frontend scrollTo() function.

Calling the scrollTo() function on an element in a repeated item that is selected from the global scope causes an error.

Syntax

function scrollTo(): Promise<void>

scrollTo Parameters

This function does not take any parameters.

Returns

Fulfilled - When the scroll is complete.

Return Type:

Promise<void>

Was this helpful?