I am trying to make a webpage that will change a picture based on the time. I would like one picture (image2) to display between 8:23 and 2:43 Monday-Friday and another(image1) to display the rest of the time.
I found this custom code online but I’m not sure how to get it to work within Webflow. Any help will be great, thanks.
Here is my read-only link. I changed the image names to “circle-red” and “circle-yellow”. I want the "circle-yellow to show during business hours and then hide and show the “circle-red” image in it’s place. the “share” button isn’t on my interface for some reason so I went into the project settings and shared the link that way. Thanks for your help!
Hey thanks for the code. I’ve added it to the webpage in the before body tag section but it doesn’t seem to be working. I adjust the times in the code to see if I could get the "circle-yellow to hide but it didn’t work. Did I do something wrong? I’m not sure if you can see in on the read-only view or not. Thanks for your help!
Hey Muhammad_Dilshad, I have been trying to use the code you made for me on my website and the demo site you worked on is working fine but when I tried to duplicate it and use in on another site, I can’t get the code to work. I have 4 separate image that need to show or hide based on time of day just like I had in the demo site you worked on. If you can, can you take a look and tell me what I’m doing wrong. Thanks!
When on the page that has the code, click the button that says “Is flingers open right now”. that brings up a pop up with the images that show if parts of the restaurant is open.