This example demonstrates how to create a Menu Button whose Menu instance displays a Calendar.
Begin by instantiating a Button of type "menu" and an Overlay instance that will house a Calendar instance.
Once the new Button is created, add a listener for its "appendTo" event that will be used to render its Overlay instance into the same DOM element specified as the containing element for the Button.
Once the new Button is created, add a listener for its "click" event that will be used to create a new Calendar instance. (Defering the creation and rendering of the Calendar until the firing of the "click" event improves the intial load time of the Button instance.)
Lastly, style the Button with a calendar icon.
Note: Logging and debugging is currently turned off for this example.
Copyright © 2008 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Copyright Policy - Job Openings