Hello.
I am using a scrollTo code on clicking on a button. This is the code:
export function button9_click(event) {
$w("#footerLine").scrollTo();
}
It works perfectly on the page but doesn’t work when the button is placed in a lightbox.
Is there a way to solve this?
Thank you!
Hello @contact13073 ,
The lightbox is considered as a standalone page, but displayed over another page, so when you’re in the lightbox, you can’t write code to access the elements on other pages or lightboxes, you can only access the elements which are placed inside the lightbox itself.
Ahmad
Thank you for your quick response. As I suspected.
Isn’t there another code that can solve this?
Like "when clicked, close current light box and scroll to element I the previous page?
@contact13073 You can use Wix-Storage API to save a value from the lightbox, and use a function that scrolls if it got a value and that it is valid.
It’ll take you a few minutes of reading to be able to implement it correctly.
@ahmadnasriya
A few hours you mean… 
Thank you.
@contact13073 Well, probably 
You’re welcome