title: understanding jquery ui events
body: <p>The following is an excerpt from jQuery documentation</p>
  
  <pre><code>Code examples
  
  Supply a callback function to handle the selected event as an init option.
  $( ".selector" ).selectable({
     selected: function(event, ui) { ... }
  });
  Bind to the selected event by type: selected.
  $( ".selector" ).bind( "selected", function(event, ui) {
    ...
  });
  </code></pre>
  
  <p>I tried writing the following:</p>
  
  <pre><code>$("#somedivtag").selectable(); 
  $("#somedivtag").bind("selected", function(event, ui) {
                    alert('something was selected');
                    return;  });
  </code></pre>
  
  <p>but the alert does not show up.</p>
  
  <p>I don't think I actually understand the difference between supplying a callback and binding.</p>
  
  <p>Any help would be great.</p>
  
  <p>Thanks.</p>