How to force the scroll position

Last updated

On transition between store pages Ecwid scrolls the page either to the top of the Product Browser widget 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 Product Browser widget is less then 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 Product Browser 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.

Was this article helpful?
3 out of 8 found this helpful
Get help
  • Forums

    Join the Ecwid community. Discuss support topics and store ideas with other Ecwid users.

  • Contact us

    Still have questions about Ecwid? Let us know! We will be glad to help you with your Ecwid store.

  • Status Monitor

    Get real time status updates on Ecwid services here, 24/7