AishaC Posted March 28, 2020 Share Posted March 28, 2020 LeadPages and Samcart have an option where you can make the next section of your webpage show up after X number of minutes. This is helpful if say someone has a video on a page, and at the 8th minute of the video, they want the remaining sections on the page to be visible (like a sales page). Does anyone know if this can be done in Squarespace? I image some modified coding on the parallax setting might achieve this, but I'm hardly savvy enough to know. Anybody know? Link to comment
AishaC Posted March 28, 2020 Author Share Posted March 28, 2020 @tuanphan I've seen you answer something similar. Wondering if you have any insight here... Thanks! Aisha Link to comment
tuanphan Posted March 29, 2020 Share Posted March 29, 2020 3 hours ago, acrumbine said: @tuanphan I've seen you answer something similar. Wondering if you have any insight here... Thanks! Aisha You need to use JavaScript to do this. <script> $("div").hide(); setTimeout(function(){ $("div").show(); },3000); </script> Line 1 - We select the div with $(“selector”) and hide the div. Line 2 - SetTimeout is a function which takes two parameters - i)Function to call,ii)Time delay after which we call that function. Line 3 - Inside the function we again select the div and call show function on it. Line 4 - We specify the time delay in ms(milliseconds) , so 3s ~ 3000ms. GregLema 1 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
AishaC Posted March 29, 2020 Author Share Posted March 29, 2020 @tuanphan Thank you! So if I have a page with two sections, and I want the top section to be visible immediately, and I want the second section to show up in 3 seconds, I'd add this code where exactly? Page Settings > Advanced ? Page Code Injection? A Link to comment
tuanphan Posted March 29, 2020 Share Posted March 29, 2020 29 minutes ago, acrumbine said: @tuanphan Thank you! So if I have a page with two sections, and I want the top section to be visible immediately, and I want the second section to show up in 3 seconds, I'd add this code where exactly? Page Settings > Advanced ? Page Code Injection? A Add to Page Header. Replace div with section id. Try this guide. 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
GregLema Posted August 18, 2021 Share Posted August 18, 2021 Hi tuanphan, thanks for your help. Unfortunately this has not worked. The link you shared no longer works :-(. How do I know the number of my section? Thanks! Link to comment
GregLema Posted August 18, 2021 Share Posted August 18, 2021 I found the way to find the section ID on this blog post, but I still can't get the code to work :-(... Anyone made it work? Link to comment
mames Posted March 16, 2023 Share Posted March 16, 2023 Hi, can you post and example of this code using an example div? Think I'm having a syntax issue. Not sure if I should be including the quotes or not. For example would this work? <script> $("div#block-d8f89965ca0d137117b2").hide(); setTimeout(function(){ $("div#block-d8f89965ca0d137117b2").show(); },3000); </script> or would this work? <script> $(div#block-d8f89965ca0d137117b2).hide(); setTimeout(function(){ $(div#block-d8f89965ca0d137117b2).show(); },3000); </script> Or do you mean something completely different than either of the above? Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment