Maybe it is something simple but I cannot get this right.
I have a table with data, say, 4 columns and 4 rows. I want to enter the data items from this table into anothe
If you search this site probably you would get the solution. Anyways I found something following on this website but don't remember the link to actual post. Anyways :
$(document).ready(function() {
$tabs = $(".tabbable");
$('.nav-tabs a').click(function(e) {
e.preventDefault();
$(this).tab('show');
})
$( "tbody.connectedSortable" )
.sortable({
connectWith: ".connectedSortable",
items: "> tr:not(:first)",
appendTo: $tabs,
helper:"clone",
zIndex: 999990,
start: function(){ $tabs.addClass("dragging") },
stop: function(){ $tabs.removeClass("dragging") }
})
.disableSelection()
;
var $tab_items = $( ".nav-tabs > li", $tabs ).droppable({
accept: ".connectedSortable tr",
hoverClass: "ui-state-hover",
over: function( event, ui ) {
var $item = $( this );
$item.find("a").tab("show");
},
drop: function( event, ui ) {
return false;
}
});
});
try this on jsfiddle http://jsfiddle.net/martyk/Kzf62/18/