Can I have a pop up close after a certain amount of time?

Is there a way to have a pop up appear on page load (homepage) and then close after a certain amount of time (maybe 3-5 seconds or so)?

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Hey @Tanya_Sillitti1, Please share your read-only link to help in detail. As far as I understand you want to close your modal after a certain delay if so then add this script to your body tag.

<script> setTimeout(function(){ document.getElementById("close").click(); },2000); </script>

Your modal should have a close button so add an ID to your close button and replace “close” with your desired ID or you can give close as your ID and set the desired delay now in the script the delay is 2s.

Note: You have set close interaction. The code automatically activates the close button without having the user to close.

Hope it helps. :peace_symbol:

Thank you! That worked. I’m now having an issue, however, that when the popup is closed, it’s like it’s still there because my rollover buttons aren’t working. Thoughts?

My read-only link:

I’m still having a hard time getting this popup to work. Now it’s not launching when the page loads. Can you help? I put my read-only link in the reply above.

Hey @Tanya_Sillitti1, Sorry for the late reply. As far as I see you haven’t set up your page load modal display: block interaction and the close trigger interaction and I can’t see the code suggested for your auto close of the modal if you want that functionality.

If you can send me you’ve published link and the current progress of the website’s read-only link with a loom explanation of the issue. I and anyone in the forum can assist you further.

All the best :peace_symbol:

Thank you. Here’s my loom video. Any help is much appreciated!

Hey, @Tanya_Sillitti1 here is a loom video please have a look at hope it helps :peace_symbol:

Link to the video

1 Like

Worked! Thank you so very much for the help!

I’m glad I could be of help :peace_symbol: