Let's now put together a basic navigation menu and use some of those methods and properties that we looked at in the classes. Our menu will be built from underlying HTML rather than from script.
We'll be enhancing the previous example of the image portfolio by first providing a landing, home page that will welcome us. We'll later add a context menu to the image portfolio itself so that instead of adding an extra button (like Rate!) for each option, we'll handle them via menus. Once complete, our landing page should appear like this:
Menu requires yahoo-dom-events.js
and container-core-min.js
but, as our image portfolio example already contains the full container-min.js
and all its dependencies, we just need to add menu-min.js
and its corresponding CSS file, menu.css
. A nice feature of the Dependency Configurator is that it can also provide us with a customized link to it with our selection set, such as this: