In jQuery UI, what is the type/contents of the \"ui\" object passed to the callback function of alot of the event methods, and how do I use it?
For example, the \"select
From what I understand, (and this is just from making observations and my incredible powers ::cough, cough:: of inference) ui is a object or collection of the elements that are being acted upon within the user interface. In order to access them, you need to pick the one you want to be using, rather than selecting the object as a whole. Eg. in droppable, it's ui.draggable
or ui.droppable
. In your example, ui.selected
is what would work.
$("#selectable").selectable({
selected: function(event, ui) {
$(ui.selected).find("input").attr('checked', true);
}
});
Hope that answers your question.