Do you know where you are scrolling to?

Some APIs let you navigate to a specific location on your page, such as wix-window’s scrollTo() function. This function lets you scroll directly to an element. One thing though – you need to know the coordinates of the element.

No one wants to start counting pixels. So here’s how to get the coordinates:

  1. Display the Wix Editor Toolbar in the Editor.

  2. In the Editor, move the cursor to the top-left pixel of the element on the page… meaning, the element where you want the page to scroll to.

  3. The X and Y axis Position values in the Toolbar show the coordinates.

What a useful way for you coders to have reason to visit the Wix Editor!

1 Like