Code:
<head>
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="ddaccordion.js">
/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>
<script type="text/javascript">
ddaccordion.init({
headerclass: "submenuheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view? persiststate: false, //persist state of opened contents within browser session?
toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["none"], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
if (state=="block" && isuseractivated==false){ //if header is expanded and NOT as the result of the user's action (click or mouseover)
header.style.fontWeight=700
header.style.borderBottom="1px solid #cfcfcf"
}
}
})
ddaccordion.init({
headerclass: "submenuheader2", //Shared CSS class name of headers group
contentclass: "submenu2", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: false, //persist state of opened contents within browser session?
toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["none"], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
if (state=="block" && isuseractivated==false){ //if header is expanded and NOT as the result of the user's action (click or mouseover)
header.style.borderBottom="1px solid #cfcfcf"
}
}
})
</script>
<script type="text/javascript">
(function($){
$(function(){
$('.submenuheader').click(function(){
var l = this.href;
setTimeout(function(){window.location.href = l;}, 300);
});
});
})(jQuery);
</script>
<script type="text/javascript">
(function($){
$(function(){
$('.submenuheader2').click(function(){
var l = this.href;
setTimeout(function(){window.location.href = l;}, 300);
});
});
})(jQuery);
</script>
</head>
<body>
<div id="leftcolumn">
<div id="mainmenu">Main Menu</div>
<div class="glossymenu">
<a class="menuitem" href="1.php">One</a>
<a class="menuitemheader submenuheader" href="2.php?submenuheader=0">Two</a>
<div class="submenu">
<ul>
<li><a href="3.php?submenuheader=0">Three</a></li>
</ul>
</div>
<a class="menuitembelow" href="4.php">Four</a>
<a class="menuitem" href="5.php">Five</a>
<a class="menuitemheader submenuheader" href="6.php?submenuheader=1">Six</a>
<div class="submenu">
<ul>
<li><a class="menuitemheader2 submenuheader2" href="7.php?submenuheader=1&submenuheader2=0">Seven</a>
<div class="submenu2">
<ul>
<li><a href="3.php?submenuheader=1&submenuheader2=0">Three</a></li>
</ul>
</div>
</li>
</ul>
</div>
<a class="menuitembelow" href="8.php">Eight</a>
</div>
I tried to paste my CSS code too but the message was too long. You can view it from the site:
Bookmarks