How to hide section only show after a while?

I tried to use the code on few community posts but doesn’t seem to work. Can anyone help me on this please?

Hey @Long_Nguyen :waving_hand:

You can do this with a simple CSS and JavaScript combo!

:backhand_index_pointing_right: Step 1: Add this CSS in your Custom Code > CSS:

.delayed-section {
  display: none;
}

:backhand_index_pointing_right: Step 2: Add this JavaScript in your Custom Code > Body HTML:

<script>
  setTimeout(function () {
    document.querySelectorAll('.delayed-section').forEach(function (el) {
      el.style.display = 'block';
    });
  }, 3000);
</script>

:backhand_index_pointing_right: Step 3: Add the class delayed-section to any section you want to reveal after the delay.

That’s it! Your section will appear 3 seconds after page load.
Let me know if you’d like to add a fade-in effect too — happy to help :blush:

2 Likes

thanks man. work like a charm :sunny:

2 Likes

@Long_Nguyen Awesome! Glad it worked for you :tada:

Happy funnel building! :rocket: