Results 1 to 3 of 3

Thread: Change CSS if x-mas

  1. #1
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Change CSS if x-mas

    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
    The web in one word.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    http://www.dynamicdrive.com/dynamici...etswitcher.htm

    use that as your base, and in your <head> tag put

    Code:
    <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>

  3. #3
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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?
    The web in one word.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •