I finally found a way to solve this problem.
A working solution can be found at http://jsfiddle.net/cUDLF/12/ .
Thanks to the tip in this answer .
The receiving fragment looks like
receive: function (event, ui) { var receiver = $(this).parent(), sender = $(ui.sender[0]).parent(), tab = ui.item[0], tab$ = $(ui.item[0]), // Find the id of the associated panel panelId = tab$.attr( "aria-controls" ), insertBefore = document.elementFromPoint(event.pageX,event.pageY); tab$ = $(tab$.removeAttr($.makeArray(tab.attributes). map(function(item){ return item.name;}). join(' ')).remove()); tab$.find('a').removeAttr('id tabindex role class'); if(insertBefore.parentElement == tab){ insertBefore = document.elementFromPoint(event.pageX + insertBefore.offsetWidth, event.pageY); } insertBefore = $(insertBefore).closest('li[role="tab"]').get(0); if(insertBefore) tab$.insertBefore(insertBefore); else $(this).append(tab$); $($( "#" + panelId ).remove()).appendTo(receiver); tabs.tabs('refresh'); }
Let me know if you find any problems with this approach.
Sujay source share