Submitter
SUPPORT TOPIC File Information
- Submitted: Dec 21 2008 01:51 PM
- Last Updated: Dec 21 2008 01:51 PM
- File Size: 1.47K
- Views: 2126
- Downloads: 408
Download Automatic CSS-switcher (working Model)
Automatic CSS-switcher
version 1.0 working model
Purpose:
Change your CSS automatically on preset dates, while page loads.
This is just an idea I was working on, and to my supprise it does work realy nice.
I'm in the process to upgrade this script to be able to incorporate more things, more dates, maybe even dates from a calendar etc.
Maybe this give one of you also some idea what can be done, if so, please contact me.
This example is use to automatically switch to a Christmas and New year style CSS
/*******************************
* Automatic CSS switcher -- snippet *
* - 1.0.0 Working Model *
* ====================== *
* © 2007-2008 Eduard Frankes *
* All rights reserved. *
*******************************
Usage: Save in your snippet library as CSS-switch
Change
href=style-newyear.css
href=style-xmas.css
to the proper CSS name and locations
In your template where your original CSS would be loaded just add [[CSS-switch]]
And your done!
It's originally written in dutch so a little translation
Maand = the month
dag = day
1st if statement:
checks if the month = 12 (December) if not do nothing
if the day is later then December 18 loads the Xmas style CSS, else do nothing
if day is later then December 29 it will load the Newyear style CSS.
2nd IF statement
if month = 1 (January) and the date is smaller then 8 load the Newyear style CSS
else do nothing
version 1.0 working model
Purpose:
Change your CSS automatically on preset dates, while page loads.
This is just an idea I was working on, and to my supprise it does work realy nice.
I'm in the process to upgrade this script to be able to incorporate more things, more dates, maybe even dates from a calendar etc.
Maybe this give one of you also some idea what can be done, if so, please contact me.
This example is use to automatically switch to a Christmas and New year style CSS
/*******************************
* Automatic CSS switcher -- snippet *
* - 1.0.0 Working Model *
* ====================== *
* © 2007-2008 Eduard Frankes *
* All rights reserved. *
*******************************
Usage: Save in your snippet library as CSS-switch
Change
href=style-newyear.css
href=style-xmas.css
to the proper CSS name and locations
In your template where your original CSS would be loaded just add [[CSS-switch]]
And your done!
It's originally written in dutch so a little translation
Maand = the month
dag = day
1st if statement:
checks if the month = 12 (December) if not do nothing
if the day is later then December 18 loads the Xmas style CSS, else do nothing
if day is later then December 29 it will load the Newyear style CSS.
2nd IF statement
if month = 1 (January) and the date is smaller then 8 load the Newyear style CSS
else do nothing
Other files you may be interested in ..
- 248 Total Files
- 19 Total Categories
- 50 Total Authors
- 131,653 Total Downloads
- TripTracker Gallery Latest File
- Dean Latest Submitter











