Forum Moderators: not2easy
Every time an event passes, I go and grey it out. But I was thinking, "This is mundane. Can I get the CSS to do that for me?"
Does anyone know? I did find someone who was able to change their entire website theme based on the hour of the day:
I'm guessing it would be something very similar to this, but without using "getHours". Am I right?
Has anyone else done this?
~Benjamin
[edited by: SuzyUK at 3:37 pm (utc) on April 11, 2007]
[edit reason] Please no URI's per TOS #13 [WebmasterWorld.com] [/edit]
It would be possible to get JS to parse the date, and set a class name based on it. You'd have to start by putting the date text in a uniquely identifiable tag, set class='date' or something. You don't actually have to have a CSS definition for .date, it's just so we can ID them.
You'd then split the contents of that tag, the first word would always have to be the month, the first 1 or 2 digits of second word would be the day.
You could then work it out and change the classname.