JavaScript Dropdown Menu

JavaScript Dropdown Menu
This update to the TinyDropdown dropdown menu script offers improved stability, speed, and features. Added features include animation toggles, a speed toggle, a rollout timeout, and improved style handling. The script is still very lightweight at only 1.7KB packed and should perform noticeably better than the previous version. Styling is completely flexible through the CSS… you can even make this a vertical menu with a few tweaks.
The script is executed by passing an object to the init function. A sample call would look like the following:
1var dropdown=new TINY.dropdown.init("dropdown", {id:'menu', active:'menuhover', fade:true, slide:true, timeout:200});
Parameters include (tag – description (type) – default):
1id - ID of the navigation (string - required) - ''
2active - CSS class for active state (string) - ''
3fade - toggle fade tween (bool) - true
4slide - toggle slide tween (bool) - true
5speed- toggle slide tween (1-9) - 5
6timeout - time in milliseconds to pause before hide on rollout (int) - 200

Click here for the demo.

Click here to download

This script is tested in IE7+, FF, Chrome, Opera, and Safari and is available free of charge for both personal or commercial projects under the creative commons license. I welcome any bug reports. Head to the Scriptiny QA for community support.
JavaScript Dropdown Menu JavaScript Dropdown Menu Reviewed by JohnBlogger on 6:05 PM Rating: 5

No comments: