So here’s the idea:
I’m looking for a solution In a page on where I can use the scroll wheel of my mouse to scroll between anchors. Is that possible?
Thank you very much In advance
So here’s the idea:
I’m looking for a solution In a page on where I can use the scroll wheel of my mouse to scroll between anchors. Is that possible?
Thank you very much In advance
Hey!
You can play with onViewportEnter( ) and scrollTo( ) with anchors.
You can see an example of the similar functionality here: https://www.wix.com/corvid/forum/main/comment/5d4ede08156a73003335d85f
Check out these forum posts as well:
And also this website: https://www.wixproisrael.com/demo1
And Api reference that you should use:
https://www.wix.com/corvid/reference/$w.ViewportMixin.html
https://www.wix.com/corvid/reference/wix-window.html#scrollTo
Good luck!
Hi, @yevheniias is there a way to have a look to code of this beautiful excample? https://www.wixproisrael.com/demo1
Hello, you can see the code in the website if you inspect it, in chrome on the website type in crtl+shift+i and it will come up, there you can search for code but clicking on the top three dots in the right hand corner and searching for the code elements.
Hope that helps!
Thank you, I did - which option should I choose?
Search and then search for the elemnts that are relevant to what you need that Yevheniia Semenina highlighted in the API references. That will allow you to preview how they work on that website.
Thank you for the explanation, but it is still difficult for me to find that code. I am not sure is this example website is created for learning purpose but maybe there is a possibility to add me as a Contributor. That would solve all the problems.
Looking forward to hearing from you.
Hi, can I become a Contributor of https://www.wixproisrael.com/demo1 example?
All you are doing there is opening the developer tools in Google Chrome and then you are able to inspect the site.
If you do as suggested above and search for viewport, then you can find all the places that use it on the site.
Simply click on the viewport results at the top that relate to what you are after and you will be able to see the page code in the window above it.
However, simply looking at another users code or copying and pasting code is no good if you are not understanding what the code does etc.
Also, note that sites could have multiple pages of code that interact with each other as some will have page code and site code, whilst others will have just page code only.
Therefore, it would be much better for yourself to take note of what Yevheniia has already mentioned and read up about using the various bits of code, so that you can get a basic understanding of what they do and then they doing it yourself on a test page.
Finally, if you search the forum for scrollto, you will find many previous posts and some with code examples that can help you more too.