Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Different backgrounds for different time of day? [duplicate]

Possible Duplicate:
Changing background based on time of day (using javascript)

I'm looking to create a site where the background rotates a bunch on files for different times of day. Is there any way I can tie maybe a bit of javascript to change the background at certain times based on the either the server or script clock?

I'm looking to have a day/afternoon/evening/night/dawn set of backgrounds that I want to cycle through.

like image 816
olliejudge Avatar asked Feb 24 '23 20:02

olliejudge


1 Answers

Using the code in this question, fetch the local time, and change the CSS of the element, which keeps the background.

like image 130
Herr Avatar answered Feb 26 '23 22:02

Herr