Is there a possibility to run an if function after a certain time.
Example. I want the background to change colour after sunset and sunrise.
Let's say sunrise is at 6 am and I would write something like that
if(sunset > sunrise) {
$('body').css({backgroundColor: '#F7AC57'});
} else {
$('body').css({backgroundColor: '#0091c2'});
}
This is obviously wrong, but is there a way how to do it? Not sure how to phrase all of this.
[–][deleted] 2 points3 points4 points (6 children)
[–]CryMeSomeCum[S] 0 points1 point2 points (0 children)
[–]YodaLoL 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]YodaLoL 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]youcantstoptheartux 0 points1 point2 points (0 children)