power-box.de
-


Hinweise


Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten
Alt 06.02.2007, 17:42   #1
TP-Junior
 
Registriert seit: Mar 2005
Nalamar macht alles soweit korrekt

Dyn. Menü - IE geht, Firefox nicht


Hallo, kann mir vielleicht von euch wer nen tip geben warum mein dynamische Menü im Firefox (2.0.0.1) nicht das tut was es soll, im IE(6) dafür aber schon ?

QC - menu.php

Code:
<ul id="ajax">
 <li><a href="index.php" title="Startseite">Startseite</a></li>
 <li><a href="index.php?section=news" title="News">News</a></li>
 <li><a href="#" title="Bebotta">BeBoTTa</a>
  <ul>
    <li><a href="#" title="2003">2003</a>
      <ul>
        <li><a href="index.php?section=pics03" title="Bilder 2003">Bilder</a></li>
        <li><a href="index.php?section=res03" title="Resultate 2003">Ergebnisse</a></li>
        <li><a href="index.php?section=arch03" title="Archiv 2003">Archiv</a></li>
      </ul>
    </li>
    <li><a href="#" title="2004">2004</a>
      <ul>
        <li><a href="index.php?section=pics04" title="Bilder 2004">Bilder</a></li>
        <li><a href="index.php?section=res04" title="Resultate 2004">Ergebnisse</a></li>
        <li><a href="index.php?section=arch04" title="Archiv 2004">Archiv</a></li>
      </ul>
    </li>
    <li><a href="#" title="2005">2005</a>
      <ul>
        <li><a href="index.php?section=pics05" title="Bilder 2005">Bilder</a></li>
        <li><a href="index.php?section=res05" title="Resultate 2005">Ergebnisse</a></li>
        <li><a href="index.php?section=tom05" title="Tombola 2005">Tombola</a></li>
        <li><a href="index.php?section=arch05" title="Archiv 2005">Archiv</a></li>
      </ul>
    </li>
    <li><a href="#" title="2006">2006</a>
      <ul>
        <li><a href="index.php?section=pics06" title="Bilder 2006">Bilder</a></li>
        <li><a href="index.php?section=res06" title="Resultate 2006">Ergebnisse</a></li>
        <li><a href="index.php?section=tom06" title="Tombola 2006">Tombola</a></li>
        <li><a href="index.php?section=arch06" title="Archiv 2006">Archiv</a></li>
      </ul>
    </li>
    <li><a href="#" title="2007">2007</a>
      <ul>
        <li><a href="index.php?section=prog07" title="Programm">Programm</a></li>
        <li><a href="index.php?section=reg07" title="Regeln">Regeln</a></li>
        <li><a href="index.php?section=meld07" title="Anmeldung">Anmeldung</a></li>
      </ul>
    </li>      
  </ul>
 </li>
 <li><a href="index.php?section=sponsoren" title="Sponsoren">Sponsoren</a></li>
 <li><a href="#" title="Kontakt">Kontakt</a>
  <ul>
    <li><a href="index.php?section=kontakt" title="Anschrift">Anschrift</a></li>
    <li><a href="index.php?section=impressum" title="Impressum">Impressum</a></li>
  </ul>
 </li>
 <li><a href="#" title="Intern - gesperrt">Intern - gesperrt</a></li>
</ul>
Die javascripte dazu:

Code:
function collapseMenu(node) {
 if (!document.getElementById) return false;
 if (!document.getElementById("ajax")) return false;
 if (!node) node = document.getElementById("ajax");
 
 if (node.childNodes.length > 0) {
  for (var i=0; i<node.childNodes.length; i++) {
   var child = node.childNodes[i];
   if (child.nodeName == "UL") {
    child.style.display = "none";
   }
   collapseMenu(child);
  }		
 }
}

function prepareMenu() {
 if (!document.getElementById || !document.getElementsByTagName) return false;
 if (!document.getElementById("ajax")) return false;
 if (!ajax.getElementsByTagName("a")) return false;
 
var links = document.getElementById("ajax").getElementsByTagName("a");
 for (var i=0; i<links.length; i++) {	
  links[i].onclick = function() {
   toggleMenu(this.parentNode.getElementsByTagName("UL")[0], this.href);
   return false;
  }
 }
}

function toggleMenu(node, link) {
 if (!document.getElementById) return false;
 if (!link) return false;
 if (node.parentNode.parentNode.id == "ajax") {
 hideTopLevels();
 }
 if (!node) location.href = link.href;
 
 
 if (node.style.display == "") {
 Effect.Fade(node, {duration: 0.4});
} else {
 Effect.Appear(node, {duration: 0.3});
}
}

function addLoadEvent(func) {
 var oldonload = window.onload;
 if (typeof window.onload != 'function') {
  window.onload = func;
 } else {
  window.onload = function() {
   oldonload();
   func();
  }
 }
}

function hideTopLevels() {
 if (!document.getElementById) return false;
 if (!(node = document.getElementById("ajax"))) return false;
 
 if (node.childNodes.length > 0) {
  for (var i=0; i<node.childNodes.length; i++) {
   var child = node.childNodes[i];
   for(var j=0; j<child.childNodes.length; j++) {
    var grandchild = child.childNodes[j];
    if (grandchild.nodeName == "UL") {
     if (grandchild.style.display == '') {
      Effect.BlindUp(grandchild, {duration: 0.2});
     }
    }
   }
  }		
 }
}

addLoadEvent(collapseMenu);
addLoadEvent(prepareMenu);
Die nötigen .js files sind in der index.php im head eingebunden.

Zu finden ist das menü unter www.bebotta.net

Nachgeproggt hab ich das ganze nach http://www.blazenewmedia.com/article...avigation-menu
Dessen "Final example" läuft aber komischer weisse in meinem Firefox, hat jemand nen tip für mich ?

Danke im Vorraus
Nalamar ist offline   Mit Zitat antworten


Antwort

  Aktuelles Thema
  TP Hilfe Forum > Web-Editoren & Coding > Traum-Dynamik
Dyn. Menü - IE geht, Firefox nicht Dyn. Menü - IE geht, Firefox nicht
« Script in Mozilla :o( | for schleife »

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 17:16 Uhr.

Powered by: vBulletin Version 3.7 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. / Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Traum-Projekt.com | Suchen | Archiv | Impressum | Kontakt | | | Nach oben |



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67