+1  A: 

The documentation for the events can be found here: http://jqueryui.com/demos/sortable/

I'm guessing you would want to use the sort or the change event.

Ken Browning
ty - this got me started
vol7ron
+1  A: 

A list of events for the jquery ui sortable plugin can be found here: http://jqueryui.com/demos/sortable/#events

jelbourn
http://jqueryui.com/demos/sortable/#event-change to be more precise :)
dvhh
ty - this got me started
vol7ron
+2  A: 

Use the stop event of the sortable plugin.

This event is triggered when sorting has stopped.

In your example

$('.sortable').sortable( { revert       : true
                               , connectWith  : ".sortable"
                               , stop         : function(event,ui){/*do whatever here*/}
                               }
      );
Gaby
that almost works, now how to limit this to a particular element
vol7ron
@vol7ron, `ui.item` inside the callback function holds the element that was moved, so perhaps you can work with that.. what exactly you want to limit ?
Gaby
I'm working on centering a datepicker that can be dragged and dropped. Using the forumla: `(dp.parent.width - dp.width)/2`. Eventually, I will include what columns are okay to resize in, and what ones should just be left/right justified. There may be an easier way to do this, but I'm working with a multi-column layout.
vol7ron
@vol7ron, a simple example at http://www.jsfiddle.net/WRJqt/1/ to see the stop in action along with limiting actions on specific element. You might also want to look at droppables in jquery .
Gaby
`ui.item.find('.2')` seems to do what i need for traversal, the stop() function also does what I need. -- I just know how inefficient this is going to be, though.
vol7ron
one other quick question: does `ui` have an object that defines the destination object? Example, I have two '.sortable's above. Is there a way to see what container it was dropped in?
vol7ron
@vol7ron, you can have the opposite functionality, you can use the `receive: function(event,ui)` event of a droppable element, and then you have access to `ui.sender`
Gaby
@Gaby, yeah I was hoping to trigger an event on a particular list when something is inserted into it. Something like check the inserted object and if its a particular element then perform some action.
vol7ron