Skip to main content

 

Hello, I'm attempting to create a scroll-up button within a lightbox. It functions as expected on the main landing page. However, when I replicate the JavaScript and stylesheets logic while modifying the element's ID, I'm unable to make it work. I'm curious if it might not be feasible to implement this functionality inside a lightbox. Thank you.

Hi @zain

It might help if you share your actual implementation/preview but in any case… 

Scroll up is pretty easy to implement. You just need to anchor it to something to “go back up to”. 

This anchor can even be an empty transparent box if you need a more granular control to the exact scroll position. (Just make sure you adjust the mobile view accordingly).

Here is a quick example: https://hello.revise.agency/scroll-up-lightbox/

Step 1: Add your button

Step 2: Point it to where you want to scroll up. If you are using an Unbounce element don’t forget to add # before the element ID. 

Step 3 (optional): Add a smooth scroll script

That’s about it. 

Let us know if you have any more questions or trouble setting this up. 


Best,


Reply