Sorry if my question is too simple, but I can't figure it out from the jQuery UI documentation.
How can I determine which option was clicked within a menu? I tried something like this but it didn't work:
var menu = $('#menu');
menu.menu({
select: function(event, ui) {
alert(ui.type);
}
});