Nieuw lid |
|
Hallo allemaal,
Ik heb een vraag.
Ik probeer een uitklapmenu op mijn website te plaatsen, maar ik krijg het niet voor elkaar om een menu item door te linken naar een pagina. Op onderstaande url staat een test.
website
Zoals je ziet kan je op test 1 klikken en dan gaat hij automatisch naar een pagina, in dit geval even naar menu.php. Ik wil ook dat test 2 naar een bepaalde pagina gaat, maar op de een of andere manier wordt dit waarschijnlijk geblokkeerd in de Javascript.
Heeft iemand enig idee hoe ik dit kan oplossen?
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="CSS/style.css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="ddaccordion.js"></script>
<script type="text/javascript" src="JS/site.js"></script>
</head>
<body>
<div id="glossymenu"><span class="glossymenu">
<a class="menuitem" href="menu.php">test 1</a>
<a class="menuitem submenuheader" href="menu.php" >test 2</a>
<div class="submenu">
<ul>
<li><a href="menu.php">test 2a</a></li>
<li><a href="menu.php">test 2b</a></li>
<li><a href="menu.php">test 2c</a></li>
</ul>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <link rel="stylesheet" type="text/css" href="CSS/style.css"/> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="ddaccordion.js"></script> <script type="text/javascript" src="JS/site.js"></script> </head> <body> <div id="glossymenu"><span class="glossymenu"> <a class="menuitem" href="menu.php">test 1</a> <a class="menuitem submenuheader" href="menu.php" >test 2</a> <div class="submenu"> <ul> <li><a href="menu.php">test 2a</a></li> <li><a href="menu.php">test 2b</a></li> <li><a href="menu.php">test 2c</a></li> </ul> </div> </body> </html>
JS
Plaatscode: 138421
JS2:
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", "clickgo", 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: true, //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: ["suffix", "", ""], //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
//do nothing
}
})
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", "clickgo", 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: true, //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: ["suffix", "", ""], //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 //do nothing } })
Marten schreef: Lappen code dan 60 a 70 regels op www.plaatscode.be
|