Streaming live at 10am (PST)

Background switching time of day


#1

Hi! Perhaps in webflow backgrounds to make the change by time of day?


#2

Hi there,

This is possible inside of webflow if you have a regular interval between the times of day, using a slider with a very long delay. The maths:

There are 86400 seconds in a day, and the webflow designer ask for the delay, so however many slides you have you set to 86400/[number of slides]... so if you have 6 slides the number is 14400, 12 is 7200... you set that as your slider delay:

NOTE: you must type "s" afterwards for it to be in seconds not milliseconds...

then you MUST PUBLISH THE SITE AT THE EXACT TIME OF DAY YOU WANT YOUR SLIDER TO START! and you can mess around with the slide order to make it easier but this is the most inconvenient thing about this...

A WORKING EXAMPLE OF THIS CAN BE FOUND HERE: http://arthurplayground.webflow.io/day-time, it is not accurate or to perfect time because I didn't want to wait but it works :). you can clone that here: https://webflow.com/website/Forum-Help

NOTE: if you have irregular intervals let me know because it is also possible in interactions but is much harder smile

Hope this helps,

Arthur


#3

Thank you Arthur! But the problem is that if I set the site in the same time zone or the other it will not work correctly. Tell me how to solve this problem?


#4

Wrooooong. This will trigger showing the second slider AFTER half od the day being on website. What you should do is set up a code that will check on what time it is right now and if it is between X and Y then show that or else show something else.

Please refer to my previous post regarding this.

See Notice! info on that page.


#5

How to use this script with the slider ?


#6

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.