Why You Might Want to Use YADM

YADM was created with the following ideas in mind:

  • JavaScript Independence - YADM enhances a nested list in the markup, and doesn't generate any extra markup.

  • Mouse Independence - By applying the functionality when clicking and when hovering over the item keyboard users can also reach the nested menus, something that cannot be done in CSS-only solutions

  • Easy restyling - The look is maintained exclusively in CSS, YADM applies different classes to the markup to achieve that.

  • "Style on the fly" - You can define a style for the non-JavaScript menu and one for the JavaScript enhanced one in the same style sheet. Interactive elements get an own class indicating the user that this is not a simple link, but contains a hidden menu. Active elements get an own class.

  • No script knowledge necessary - Changes in the markup (adding classes) change the behaviour, rather than you knowing how to change the JavaScript.

  • Unobtrusive Javascript - Only applies itself if all is working (right markup, DOM-enabled browser) and works fine with other scripts

  • Browser independence - Although some browsers may behave oddly (Opera still has issues updating the screen, resulting in half-visible menus), the script does not sniff or check for any browser - just for objects.