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