Hey,
wie kriege ich es hin, dass die Menüpunkte erst aufgerufen werden, wenn man auf das Menü klickt?
Also man klickt auf "Testmenu" z.B. und darunter öffnen sich dann die einzelnen links zu den seiten.
MfG
SeToY
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
function klapp(elementID) { if (document.getElementById('container1').style.display == 'block') { document.getElementById('container2').style.display = 'block'; document.getElementById('container1').style.display = 'none'; document.getElementById('pic'+elementID).src = './include/images/gw2.gif'; document.cookie = 'container1'+'=1'; document.cookie = 'container2'+'=2'; } else if (document.getElementById('container1').style.display == 'none') { document.getElementById('container2').style.display = 'none'; document.getElementById('container1').style.display = 'block'; document.getElementById('pic'+elementID).src = '/include/images/gw.gif'; document.cookie = 'container1'+'=2'; document.cookie = 'container2'+'=1'; } } </script>
<span id="container1" name="container1" style="display: block;"> Hier sollte das element stehen is eigentlich egal was </span>
javascript:klapp('container1')
function klapp(elementID) { if (document.getElementById('container1').style.display == 'block') { document.getElementById('container2').style.display = 'block'; document.getElementById('container1').style.display = 'none'; document.getElementById('pic'+elementID).src = './include/images/gw2.gif'; document.cookie = 'container1'+'=1'; document.cookie = 'container2'+'=2'; } else if (document.getElementById('container1').style.display == 'none') { document.getElementById('container2').style.display = 'none'; document.getElementById('container1').style.display = 'block'; document.getElementById('pic'+elementID).src = '/include/images/gw.gif'; document.cookie = 'container1'+'=2'; document.cookie = 'container2'+'=1'; } } </script>
javascript:klapp('container1')
<span id="container1" name="container1" style="display: block;"> Hier sollte das element stehen is eigentlich egal was </span>
<span id="container1" name="container1" style="display: block;"> Hier sollte das element stehen is eigentlich egal was </span>
<script type="text/javascript"> function switchlayer(Layer_Name) { var GECKO = document.getElementById? 1:0 ; var NS = document.layers? 1:0 ; var IE = document.all? 1:0 ; if (GECKO) {document.getElementById(Layer_Name).style.display= (document.getElementById(Layer_Name).style.display=='block') ? 'none' : 'block';} else if (NS) {document.layers[Layer_Name].display=(document.layers[Layer_Name].display== 'block') ? 'none' : 'block';} else if (IE) {document.all[Layer_Name].style.display=(document.all[Layer_Name].style.display== 'block') ? 'none' : 'block';} } </script> <ul> <a href="#" onclick="javascript:switchlayer('submenu1'); return false;">Submenu1</a> <ul id="submenu1" type="circle" style="display:none;"> Submenu1.1<br /> Submenu1.2<br /> Submenu1.3<br /> Submenu1.4<br /> </ul><br /> <a href="#" onclick="javascript:switchlayer('submenu2'); return false;">Submenu2</a> <ul id="submenu2" type="circle" style="display:none;"> Submenu2.1<br /> Submenu2.2<br /> </ul> </ul><br />
<span id="container1" name="container1" style="display: block;">
</span>
Geschlossen | ||
Zurück zu HTML, PHP, SQL,... |