Home arrow JavaScript arrow Using the YUI Menu Control
JAVASCRIPT

Using the YUI Menu Control


I recently wrote an article that gave a general overview of the Yahoo! User Interface library, or YUI. It's a comprehensive library of utilities and controls written in AJAX for developers like you. Using it can save you time and frustration and throughout the course of this article, I'll be looking at just how easy it is to create a functional, attractive and effective navigation menu, using nothing but a little HTML and the library.

Author Info:
By: Dan Wellman
Rating: 4 stars4 stars4 stars4 stars4 stars / 20
May 02, 2007
TABLE OF CONTENTS:
  1. · Using the YUI Menu Control
  2. · Creating a Basic Menu
  3. · Rendering and Displaying the Menu
  4. · Changing the Styling

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Using the YUI Menu Control
(Page 1 of 4 )


A downloadable zip file is available for this article.

All you'll need to complete this tutorial are the files indicated below and a simple text editor. To add custom images to the menu, you may require the services of an image editing application, but feel free to use the images I have provided with the source files.

Although you can reference the library files held on the Yahoo! server to save you downloading the whole library, I found it easier when working with the YUI to create an offline store of the files that you need. Doing this makes it easier to address the various files from within your code.

To get started, create a new folder on your C: drive called yuimenu and then create another one called yui inside of that one. You'll need to download a copy of the YUI, which can be obtained from the yui site. Once you have downloaded it, open it and look for the following files which the menu control depends on for its behavior and default appearance:

fonts_min.css

menu.css

yahoo-dom-event.js

container_core-min.js

menu-min.js

The library is separated into several sections and consists of hundreds of separate files; it features a build section, an examples section and a documentation section. The files you need will all be in the build section. If you look in the menu folder within the library (where several of the required files can be found), you'll see an assets folder containing images used by the library as well as the menu.css file. Copy this folder and all its contents to your yui folder as well.

For the record, the _min extension on most of the required files means that all of the helpful comments and white space have been removed from the files. They will function in exactly the same way as the full versions of the files, but have been designed to be used across the Internet and are therefore as minimal as possible.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks
- Dynamic jQuery Styling

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials