Results 1 to 2 of 2

Thread: css switcher

  1. #1
    Member sudhakararaog's Avatar
    Join Date
    Sep 2009

    Default css switcher 21 Mar 2010 @ 06.42

    please look at this link
    Page Not Found

    i have taken this example from this website
    CSS Style Switcher | Design Shack

    i have followed all the instructions and also changed the sign to a single quote ' in the a tag
    <a href="#" onclick="setActiveStyleSheet('orange'); return false;">Orange</a>

    also tried with calling the styleswitcher.js first followed by the css files and also with css files first and then styleswitcher.js

    i am not able to change the background of the page to grey when
    Change Style link is clicked on my website

    can anyone let me know how to fix this

      Reply With Quote

  2. #2
    Trusted Guru Frinkky's Avatar
    Join Date
    Dec 2008
    Blog Entries

    Default 21 Mar 2010 @ 08.00

    I have a style switcher on my site (activated using the 3 small coloured squares just to the right of my logo).

    The different stylesheets are defined as:

    <link rel="stylesheet" type="text/css" href="" media="screen" title="redbg" /> 
    <link href="" rel="alternate stylesheet" type="text/css" title="firebg"/> 
    <link href="" rel="alternate stylesheet" type="text/css" title="balletbg"/>
    The js (minified unfortunately):

    and the html for the links:

    <div id="styleclick"> 
         <div id="style1"><a href="#" onclick="setActiveStyleSheet('redbg'); return false;"><img src="/wp-content/themes/pixelforge/images/redbg_icon.png" alt="Red Background" /></a></div> 
         <div id="style2"><a href="#" onclick="setActiveStyleSheet('firebg'); return false;"><img src="/wp-content/themes/pixelforge/images/firebg_icon.png" alt="Fire Background" /></a></div> 
         <div id="style3"><a href="#" onclick="setActiveStyleSheet('balletbg'); return false;"><img src="/wp-content/themes/pixelforge/images/balletbg_icon.png" alt="Green Background" /></a></div> 
    I have the stylesheets listed before the js if that helps. Just view source.

    Looking at your css files, I'd merge styleswitcher.css and styleswitcher-default.css to become the only default stylesheet.
      Reply With Quote

Similar Threads

  1. PHP Style Switcher
    By Michael in forum PHP, ASP & Java
    Replies: 20
    Last Post: 10 Jun 2009, @ 12.05

Tags for this Thread

Posting Permissions

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