Jump to content

Delay reveal of button after 60 minutes on page

Recommended Posts

Hi everyone! I'd like to add a button delay after 60 minutes (you know how it's done on some funnels). A person starts watching a video and then a button appears to sign up or buy something.

I did my research and it seems like this can be achieved with JavaScript, you can delay a button with changing the opacity so it goes from 0% to 100% opacity in 60 minutes.

Can someone help me with a piece of code for that?
Thank you!

https://dogfish-duck-48ky.squarespace.com/ 
password: 0000

Link to comment
  • Replies 1
  • Views 273
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

#1. First, use Squarespace ID Finder to find ID of Button Block

https://chromewebstore.google.com/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff

In my example, we will have: #block-yui_3_17_2_1_1717399220695_40609

image.png.4b96b93a55de927832d0424a93a8359a.png

#2. Use this code to Custom CSS box

/* Hide button initial */
div#block-yui_3_17_2_1_1717399220695_40609 {
    display: none;
}

image.png.446160015dbe5f79ae4010073a9517d5.png

#3. Use this code to Page Header Code Injection

5000 in the code is 5 seconds

with 60 minutes, you can change it to 360000

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function () {
    setTimeout(function(){
        $('div#block-yui_3_17_2_1_1717399220695_40609').fadeIn(800);
    }, 5000);
});
</script>

image.thumb.png.db91c7fcc5e60d54903d5891d9eb9434.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.