ivGeo

Full Version: Style switcher
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Style switcher - the one from ANSCD experimental

Lots of people are asking me how this works so here it is...

download this
http://www.ivgeo.net/mybb/images/ANSCD-e...witcher.js
and save it to your themes folder

in headerinclude
replace this
Code:
<link rel="stylesheet" type="text/css" href="{$theme['css_url']}" />
with this
Code:
<link rel="stylesheet" type="text/css" href="{$theme['css_url']}" title="default" />
<link rel="alternate stylesheet" type="text/css" href="{$theme['imgdir']}/anscd_green.css" title="green" />
<link rel="alternate stylesheet" type="text/css" href="{$theme['imgdir']}/anscd_orange.css" title="orange" />
<script type="text/javascript" src="{$theme['imgdir']}/styleswitcher.js"></script>
in header or anywhere you want put this
Code:
div style="padding: 10px;">
<a href="#"
onclick="setActiveStyleSheet('default');
return false;" style="color: blue;">change style to default</a> -

<a href="#"
onclick="setActiveStyleSheet('green');
return false;" style="color: green;">change style to green</a> -


<a href="#"
onclick="setActiveStyleSheet('orange');
return false;" style="color: orange;">change style to orange</a>

</div>
just replace ANSCD-exp with your theme name

ANSCD-experimental theme attached at the bottom of this post
thanks ivgeo Smile

super
Reference URL's