Question:
How to get the “x” or “y” coordinates of any element on the screen?
Product:
Wix Studio + VS Code
What are you trying to achieve:
I would like to manage the Y or X coordinate values so I can use them as event triggers or animations when the page is crolled. I’m not an advanced programmer, so I still lack code skills.
What have you already tried:
I’ve been working closely with Chat GPT, who has proven to be 100% helpful in teaching me and improving my code. But there are some properties that GPT proposes to achieve the results, but which do not exist (or maybe are poorly formatted)
For example, he proposes searching for values with “getBoundingRect” and “scrollY”… neither of them seem to belong to Wix.
By the way, I understand that “viewPort” equals 100% of the visible part (or window) of the browser.
Additional information:
[Include any other pertinent details or information that might be helpful for people to know when trying to answer your question.]