Nov
JavaScript Dropdown Menu with Multi Levels
Posted by Michael in JavaScript
This multi-level drop down menu script weighs in at only 1.2 KB. It features animation, active header persistence, easy implementation and multiple instance support.
To initialize a drop down menu use the following code:
var menu=new menu.dd("menu");
menu.init("menu","menuhover");
You must create a new menu object before initialization. The parameter taken by menu.dd is the variable name used for the object. The object.init function takes 2 parameters: the id of the menu unordered list and the id of the initially sorted column (optional). If you want to exclude a column from sorting then add class=”nosort” to the appropriate table header. The styling of the table is totally customizable via CSS.
This script has been tested in Firefox 2/3, IE 6/7/8, Opera, Safari and Chrome. Note that submenu animation is currently unavailable in FF2 and Opera but do does not affect the functionality of the drop down menu. Please send any bug reports to michael@leigeber.com with the title “BUG REPORT”. This script is available for any personal or commercial projects and is offered AS-IS, NO FREE SUPPORT PROVIDED.
Click here to download the source code.
34 responses so far


