The following is an excerpt from jQuery documentation
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) {
...
});
I tried writing the following:
$("#somedivtag").selectable();
$("#somedivtag").bind("selected", function(event, ui) {
alert('something was selected');
return; });
but the alert does not show up.
I don't think I actually understand the difference between supplying a callback and binding.
Any help would be great.
Thanks.