Results 1 to 2 of 2

Thread: css switcher

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

    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
    sudhakargolakaram.co.in/cssswitch.html


    can anyone let me know how to fix this

    thanks
      Reply With Quote

  2. #2
    Trusted Guru Frinkky's Avatar
    Join Date
    Dec 2008
    Posts
    1,678
    Blog Entries
    1

    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:

    Code:
    <link rel="stylesheet" type="text/css" href="http://thepixelforge.net/wp-content/themes/pixelforge/style.css" media="screen" title="redbg" /> 
    <link href="http://thepixelforge.net/wp-content/themes/pixelforge/fire_bg.css" rel="alternate stylesheet" type="text/css" title="firebg"/> 
    <link href="http://thepixelforge.net/wp-content/themes/pixelforge/ballet_bg.css" rel="alternate stylesheet" type="text/css" title="balletbg"/>
    The js (minified unfortunately):

    http://thepixelforge.net/wp-content/...s/style.min.js

    and the html for the links:

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