Forcing the scroll position

Last updated

On transition between store pages Ecwid scrolls the page either to the top of your store or to the top of the whole page. It depends on the distance from the top of the page to the top of the Product Browser widget.

For instance, if the page header before the store is less then the threshold (at the moment it is 150 px), then Ecwid scrolls to the top of the page. If the page header is more than threshold, Ecwid scrolls the page to the top of the store widget.

In some cases the store owner wishes to force the scroll behavior. For instance, the header is more just several pixels more than scroll threshold. We have added a special tag to deal with such an issue: if Ecwid detects

<div id="ecwid_product_browser_scroller"></div>

on the page, it always scrolls to this tag.

For instance, if you add <div id="ecwid_product_browser_scroller"></div> right after the <body> tag, Ecwid will always scroll to the top of the page on transition between store pages.

Back to top
Has the article answered your question?

Please send us that question. We will be happy to help by email.

Send a message