Ok, I have found a very strange solution !
- drop: function(ev, ui) {
- var $item = $(this);
- var $list = $($item.find('a').attr('href')).find('.column:first');
- ui.helper.remove();
-
- //Should work ?
- ui.draggable.hide('slow').appendTo($list);
- $tabs.tabs('select', $tab_items.index($item));
- ui.draggable.show('slow');
-
- //Should work ?
- ui.draggable.hide('slow', function() {
- $tabs.tabs('select', $tab_items.index($item));
- ui.draggable.appendTo($list).show('slow');
- });
- }
Well both solution should work , i tried to uncoment my code line by line and... It look like i need to write all those lines... Very strange.
Any solution ? Any good practice ?
PS : I'm still using the "
#connect-lists-through-tabs" demo. And just added this helper to the sorted list
- helper: function(event , el){
- return $('<div class="porlet">' + el.children('.portlet-header').text() + '</div>' ).width(100).height(30).addClass("ui-widget-header ui-corner-all");
- }