Implements jQuery UI sortable.