View Full Version : Change CSS if x-mas
queerfm
03-25-2008, 12:40 PM
Hi i would like to change the css file that the browser fetchs if it is x-mas or easter?
If any one knows of a script that will allow that i would be greatful.
Thanks
boogyman
03-25-2008, 01:04 PM
http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm
use that as your base, and in your <head> tag put
<link type="text/css" rel="stylesheet" href="xmas.css" title="xmas" media="screen">
<script src="styleswitch.js" type="text/javascript">
/***********************************************
* Style Sheet Switcher v1.1- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
var today = new Date()
var xmasDate = today.getMonth()+today.getDay();
if(xmasDate == 1225)
{
function setStylesheet(xmas);
}
</script>
queerfm
03-25-2008, 02:09 PM
I i tryed your script and its not working, i replaced the date 1225 with 0325
Todays date...
I was wondering am i do anything wrong?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.