menu invoked by button

menu invoked by button

I am trying to code a menu invoked by a button with a gearbox and a triangle icon.

Much like the gearbox/triangle button used in gmail to access settings except for a bit of text between.

I can get the button nicely formatted using jquery-ui.button.  I can get the menu working using jquery-ui.menu.  But how do I make the menu start invisible and then appear when I press the button or hover (with the rest of the interaction with ESCAPE, move the mouse away from the hover, etc.)?

It appears that a slightly older version of jquery-ui had a jquery-ui.popup and at least one demo (http://view.jqueryui.com/menubar/demos/popup/popup-menu.html) shows it doing exactly what I wanted, but I can't seem to find that "popup" for version 1.10.

In http://blog.jqueryui.com/2012/10/jquery-ui-1-9-0/ it says that menu is great for popup menus.  Does that include popping up from a button?

-Peter