Looking for a solution that will hide/show a modal alert based on certain times of the week. The purpose is to alert visitors twice a week (CST) that there is a live stream happening and give them quick access to the appropriate links. It only needs to appear on the homepage and no where else.
I’ve looked around :webflow_heart: forum and others but haven’t found a solution that works. Surely there’s got to be a way for a simply script to look at the visitor’s IP or device time and then reveal the wrapping div if it’s within a certain timeframe.
Any assistance would be greatly appreciated. Maybe you could work this into a workshop, @PixelGeek.
So the challenge is to use a script make each alert only show up on its day of the week. For instance today is wednesday so the script would reveal the alert div for today .alert.wednesday. It would then look like this.
I was looking for this solution for my current project, as it would be good to show an emergency contact number for out of hours. It’s been discussed somewhere on the forum around 2014-15 but I couldn’t find it again.
Hey @samliew would you mind explaining why you said this and how it relates to the code? I noticed today when implementing onto my client site that it’s necessary to have a class for each day of the week in sequential order for the code to work. Why is this?
For those interested, I’ve updated the clone template to work with day, month, and date. You can use them individually or in combination like the example.