$('#ex1').sorttable({
}).disableSelection();
header 1 |
header 2 |
header 3 |
header 4 |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
$('#ex2').sorttable({
handle: '.draghandle', // drag using handle
placeholder: 'placeholder' // placeholder classname
}).disableSelection();
* header 1 |
* header 2 |
* header 3 |
* header 4 |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
$('#ex3').sorttable({
items: '>:not(.nosort)',
placeholder: 'placeholder',
}).disableSelection();
header 1 | header 2 | header 3 | header 4 (no sort) |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
$('#ex4').sorttable({
placeholder: 'placeholder',
helperCells: null
}).disableSelection();
header 1 | header 2 | header 3 | header 4 |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
$('#ex5').sorttable({
placeholder: 'placeholder',
helperCells: 2
}).disableSelection();
header 1 | header 2 | header 3 | header 4 |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
$('#ex6').sorttable({
placeholder: 'placeholder',
helperCells: -1
}).disableSelection();
header 1 | header 2 | header 3 | header 4 |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
* | * | * | * |
$('#ex7').sorttable({
placeholder: 'placeholder',
helperCells: ':not(.footerrow td)'
}).disableSelection();
header 1 | header 2 | header 3 | header 4 |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
class="footerrow" |
$('#ex8').sorttable({
placeholder: 'placeholder',
start: function (e, ui) { ui.item.parents('table:first').children().find('>tr:not(.ui-sortable)').fadeTo('slow', 0.25); },
stop: function (e, ui) { ui.item.parents('table:first').children().find('>tr:not(.ui-sortable)').fadeTo('fast', 1); }
}).disableSelection();
header 1 | header 2 | header 3 | header 4 |
---|---|---|---|
1-1 | 1-2 | 1-3 | 1-4 |
2-1 | 2-2 | 2-3 | 2-4 |
3-1 | 3-2 | 3-3 | 3-4 |
4-1 | 4-2 | 4-3 | 4-4 |
$('#ex9').load(
'ajax.html',
function() {
$('#exAjax').sorttable({}).disableSelection();
}
)