Hi guys,
Is there a way to anchor to a specific item rather than a location on a page? I’m trying to create a slideshow that switches to different slides when a viewer clicks a specific button. Is it possible to anchor to a container box?
Hi guys,
Is there a way to anchor to a specific item rather than a location on a page? I’m trying to create a slideshow that switches to different slides when a viewer clicks a specific button. Is it possible to anchor to a container box?
You should explain your question in more details. (attaching screenshots can be helpful).
If it’s on the same page, you can use the .scrollTo() function on the element that you want to reach.
For example:
$w('#someElement').onViewportEnter((event) => {
// The element that you want to scroll to
$w('#goHere').scrollTo();
})
if you want visitors to reach an element once they arrive on the page, include the element ID in the website URL.
https://yourdomain.com/yourpage#aboutUs
Here when people visit this URL, they’ll be scrolled to element that has the ID aboutUs
Hope that helped!
Ahmad