How to make a modal pop up once a week for 24 hours

I have a client that wants a pop-up for their deals that are only on Fridays, and to only be visible for that day. Is this at all possible?

Hi @Heather_Berryhill . I personally use this script for these types of functions:

Also, here is a video on how I use this:

Hope this helps :slight_smile:

1 Like

Hey,

This should do it for you. .pop-up being the class of the popup you want to show.

var today = new Date();
if(today.getDay() == 5){
    $('.pop-up').show();
    }

Good luck

1 Like

@Heather_Berryhill

I also have a tutorial that could be of use to you.

1 Like

Awesome Nelson - that’s so helpful.

Hey Nelson,

Wondering if you might be able to help? Great video but I can’t seem to get this working, even testing it out cloned, the cookies don’t seem to register in. Any ideas?

Thanks in advance,

Kieran

Hey @PixelGeek, I know this was posted a long time ago but I did have one question about this. Because, in the script, you hid the entire collection list, if you were to add another item to that collection (say the store owner wanted to create a different popup), wouldn’t that cookie prevent any future popups from showing up?

I’m trying to be able to create a collection that could used to create custom popups/sales, as well as an first time visitor popup. What I’m thinking of doing is adding a custom code embed and using webflow fields to dynamically update the code. What I can’t sort out is how to create different titled cookies since all the classes would be the same…

Let me know if I’m not making sense. Thanks!

Something like this:

Hi Matthew, I can’t seem to open this? The link just directs me to the projects dashboard? Really want to be able to see the clonable version to better understand if poss?

1 Like

I would like to use this tut too. I tried using #0 to show my div on Sundays, but it doesn’t seem to work. Thanks

This works great for me. Thanks!