Fancy Theme Changer Script Help
2 posters
Page 1 of 1
Fancy Theme Changer Script Help
Is there any way to combine this css & html script:
with this script?:
This is for a theme changer on a forum.
I want to make is so on the first script, when you select a theme, it changes to that theme using the 2nd script. Thanks to anyone who could help
- Code:
<style type="text/css">
ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 149px;
top: 0;
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #fff;
padding: 5px;
border: 1px solid #ccc;
border-bottom: 0;
}
ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
border-bottom: 1px solid #ccc;
}
li:hover ul { display: block; }
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace»
(" over", "");
}
}
}
}
}
window.onload=startList;
li:hover ul, li.over ul {
display: block; }
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
</style>
<ul id="nav"><li><a href="#">Theme Changer</a>
<ul>
<li><a href="#">Original</a></li>
<li><a href="#">Black Gold</a></li>
<li><a href="#">Mac Blue</a></li>
<li><a href="#">Cloudz</a></li>
<li><a href="#">Fresh Green</a></li>
</ul>
</li>
</ul>
with this script?:
- Code:
<form id="switchform"><select name="switchcontrol" size="1" onChange="chooseStyle(this.options[this.selectedIndex].value, 60)"><option value="none" selected="selected">Default style</option><option value="theme2">Black Gold</option><option value="theme3">Mac Blue</option><option value="theme4">Coudz</option><option value="theme5">Fresh Green</option></select></form>
This is for a theme changer on a forum.
I want to make is so on the first script, when you select a theme, it changes to that theme using the 2nd script. Thanks to anyone who could help
Last edited by MrMega on July 28th 2010, 4:05 pm; edited 1 time in total
MrMega- Forumember
- Posts : 981
Reputation : 11
Language : English, Polish, HTML, BBCode
Location : New York, United States
MrMega- Forumember
- Posts : 981
Reputation : 11
Language : English, Polish, HTML, BBCode
Location : New York, United States
Re: Fancy Theme Changer Script Help
I dont know something like this ;D. but if you change the "nav" in this part "navRoot = document.getElementById(">>nav<<");" to "switchform"
Guest- Guest
Re: Fancy Theme Changer Script Help
Thanks but need a little more help than that, lawl.
OK I changed the script a little:
Anyone?
OK I changed the script a little:
- Code:
<style type="text/css">
ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 149px;
top: 0;
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #fff;
padding: 5px;
border: 1px solid #ccc;
border-bottom: 0;
}
ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
border-bottom: 1px solid #ccc;
}
li:hover ul { display: block; }
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("switchform");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace»
(" over", "");
}
}
}
}
}
window.onload=startList;
li:hover ul, li.over ul {
display: block; }
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
</style>
<ul id="switchform"><li><a href="#">Theme Changer</a>
<ul>
<li><a href="#">Original</a></li>
<li><a href="#">Black Gold</a></li>
<li><a href="#">Mac Blue</a></li>
<li><a href="#">Cloudz</a></li>
<li><a href="#">Fresh Green</a></li>
</ul>
</li>
</ul>
Anyone?
MrMega- Forumember
- Posts : 981
Reputation : 11
Language : English, Polish, HTML, BBCode
Location : New York, United States
Re: Fancy Theme Changer Script Help
Since no one answering you, try look at this
http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm
http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm
Guest- Guest
Re: Fancy Theme Changer Script Help
Looks like a very good way to do it!
mollu- New Member
- Posts : 5
Reputation : 0
Language : En/Ger/Et
Similar topics
» Theme Changer?
» Split: Member written tutorials
» where has my theme changer gone???
» Theme Changer?
» theme changer
» Split: Member written tutorials
» where has my theme changer gone???
» Theme Changer?
» theme changer
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum