DHTML
  Home arrow DHTML arrow Page 3 - YADM-Yet Another Dynamic Menu
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
DHTML

YADM-Yet Another Dynamic Menu
By: Christian Heilmann
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 16
    2004-10-13

    Table of Contents:
  • YADM-Yet Another Dynamic Menu
  • Using YADM -- Changing the Look and Feel
  • How it Works
  • Working with other Scripts, and What it Does Not Do

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    YADM-Yet Another Dynamic Menu - How it Works


    (Page 3 of 4 )

    YADM uses DOM to enhance a nested list by adding and removing different CSS classes to and from it. I will not get into details of the JavaScript here, as the script itself has loads of comments in it. What it does is the following:

    • Check if the browser is capable of using DOM

    • Check if the element with the ID nav is available

    • Loop through all the LIs inside this UL

    • Check if either the LI or any of the LIs inside the nested UL
      contain the class current.

    • If that is not the case, apply the class isParent to the LI and hiddenChild to the nested UL.

    • If that is the case, apply the class isActive to the LI and shownChild to the nested UL.

    • If there is no current in the LI, apply a function that swaps the classes (isParent becomes isActive and hiddenChild shownChild) and renders the link inside the LI useless (to avoid clicking and loading the page instead of showing the menu)

    • If there is no class called nohover in the main UL, apply the class onmouseover and onclick and revert to the original state onmouseout.

    • Otherwise, just apply it onclick.

    More DHTML Articles
    More By Christian Heilmann


       · Nice menu, I want to use this one, but are there some sample menu's?SO I can...
       · The [url=http://www.onlinetools.org/tools/yadm/]YADM homepage[/url] has loads of...
       · http://www.onlinetools.org/tools/yadm/examples.html is the URL.
       · implementing this one a few new sites.if i get a chance, i'll submit a sample:...
     

    DHTML ARTICLES

    - Text-Justify, Volume, and Other Style Sheet ...
    - Ruby-Position, Size, and Other Style Sheet P...
    - Padding, Pages, and More Style Sheet Propert...
    - Marks, Orphans, and More Style Sheet Propert...
    - Layouts, Margins, and Other Style Sheet Prop...
    - Floats, Fonts, and Other Style Sheet Propert...
    - Color, Filters, and Other Style Sheet Proper...
    - Borders and More with Style Sheets
    - Learning Style Sheet Properties
    - Style Sheet Property Reference
    - Completing a Noisy Image Application
    - An Object-Based Approach to Building Noisy I...
    - A Basic Method for Building Noisy Images
    - Adding More Features to Sliders with the Scr...
    - Using Sliders with the Scriptaculous Framewo...






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT