Jump to content

How to reveal a section after certain time has passed

Recommended Posts

Site URL: https://www.tlxportal.com/access-portal

Hi all. I’d like to know how I can have a section on my page be revealed after a user spends a certain amount of time on the page. I’ve tried everything and nothing has been working, and I don’t know what to do at this point. I would imagine it would require JavaScript but I’m not really familiar with that language. I have my section ID so I can target the section, I just don’t know what to do from there

Link to comment
On 10/6/2022 at 8:02 AM, Josias said:

Site URL: https://www.tlxportal.com/access-portal

Hi all. I’d like to know how I can have a section on my page be revealed after a user spends a certain amount of time on the page. I’ve tried everything and nothing has been working, and I don’t know what to do at this point. I would imagine it would require JavaScript but I’m not really familiar with that language. I have my section ID so I can target the section, I just don’t know what to do from there

It means that your section Id(s) is (are) temporarily hidden on your page. After amount of time, it (they) will be shown as normal, right?

I think we can achieve this feature via some javascript code and the business plan is required. What is your current one?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace
🚀 Learn how to rank new pages on Google in 48 hours!

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment
  • 3 weeks later...
On 10/7/2022 at 4:42 AM, bangank36 said:

It means that your section Id(s) is (are) temporarily hidden on your page. After amount of time, it (they) will be shown as normal, right?

I think we can achieve this feature via some javascript code and the business plan is required. What is your current one?

Hey, sorry for the late response. Yes that is exactly what I'm trying to do. I have the business plan. I just don't know what javascript code I must use to hide that section of the page. This is the section Id: [data-section-id="633d0fcaa142487634820d97"]

 

I've been able to hide the visibility of the section using this code:

 

section[data-section-id="633d0fcaa142487634820d97"]{
  animation-name: cssAnimation!important;
  animation-duration: 336s;
  animation-fill-mode: forwards!important;
  
}
@keyframes cssAnimation {
  0% {visibility: hidden;}
  99.99% {visibility: hidden;}
  100% { visibility: visible;}
}

 

but I'd like to be able to have that section disappear completely without showing that  blank space.

Edited by Josias
Add in the code for better clarity
Link to comment
On 10/23/2022 at 4:58 AM, Josias said:

Hey, sorry for the late response. Yes that is exactly what I'm trying to do. I have the business plan. I just don't know what javascript code I must use to hide that section of the page. This is the section Id: [data-section-id="633d0fcaa142487634820d97"]

 

I've been able to hide the visibility of the section using this code:

 

section[data-section-id="633d0fcaa142487634820d97"]{
  animation-name: cssAnimation!important;
  animation-duration: 336s;
  animation-fill-mode: forwards!important;
  
}
@keyframes cssAnimation {
  0% {visibility: hidden;}
  99.99% {visibility: hidden;}
  100% { visibility: visible;}
}

 

but I'd like to be able to have that section disappear completely without showing that  blank space.

instead of using visibility: hidden; and visibility: visible; 

you can try

display: none;

and

display: block;

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.