Style Switcher Guide



Some of you might already know what a style switcher is, but there are some that probably don't. A style switcher is a code that lets you switch the CSS from one style to another with the click of your mouse. The CSS usually contains the colours & headers of each layout design. Here is a simple and very easy tutorial for your use only, to help you install the style switcher.

How to install the style switcher


Firstly there are two different types of style switchers, the PHP one and the Javascript one, they both work the exact same way, it just depends on your choice and if your host allows PHP. The tutorial I have firstly for you is the Java Script.

Java Script Style Switcher


Firstly, upload the styleswitcher.js into your directory. The file can be found here. Just put that in the directory. Whatever you do DO NOT edit it in any way at all. Or else the script won't work!
Secondly, Paste this code between the and Tags in your top.txt file.


Now you see where it says DEFAULT, change that to your default style css. Whatever you want to be showing when the visitor first comes to your site, that will be the default style. Next where it says style1 change that to the default style's css page and where it says style2 change that to the other styles css. Now where it says STYLE1TITLE & STYLE2TITLE just change them to whatever you want the style to be named. Also, you can add more that 2 styles, just copy that code and change it the same way show above.

After you've done that, its time to display the style switcher in the content so the visitors can actually change the styles. To do this, go down to the Body part of the layout () and paste this code


Where it says, STYLE1TITLE just add in the title of style1 & add the word of whatever the style is called ~
Thats it! You've got yourself a style switcher, if you need any help what so ever, please email me at piplup_princess@hotmail.com