I am trying to use the jQuery sortable widget in a table. Is that feasible? Or is it made to be separate from a table?
This is the link to the jQuery widget-
http://jqueryui.com/sortable/#default
I am trying to use the jQuery sortable widget in a table. Is that feasible? Or is it made to be separate from a table?
This is the link to the jQuery widget-
http://jqueryui.com/sortable/#default
You can simply apply the sortable() method to the appropriate tbody element. There are bug fixes regarding width maintenance which are addressed here, so you should apply that to your tablesorter initialization.
var fixHelper = function(e, ui) {
ui.children().each(function() {
$(this).width($(this).width());
});
return ui;
};
$("#sort tbody").sortable({
helper: fixHelper
}).disableSelection();