// Instantiate and render the menu when it is available in the DOM YAHOO.util.Event.onContentReady("sort_by_price_dropdown", function () { var oMenu = new YAHOO.widget.Menu("sort_by_price_dropdown", { hidedelay: 750, width: 140 }) ; oMenu.showEvent.subscribe(function () { this.focus(); }); oMenu.render(); YAHOO.util.Event.addListener("menutoggle", "mouseover", oMenu.show, null, oMenu); });