jQuery datatables wrong get column in drag and drop -
in datatables want find first column when dragging row , find first column in dropping row. below code wrong result in drag , drop rows, please me change thst
var startposition; var endposition; var old; var newc ; $("#example tbody").sortable({ cursor: "move", start:function(event, ui){ var ntds = $('td', this); old = $(ntds[0]).text() ; }, update: function(event, ui) { endposition = ui.item.prevall().length + 1; var newc = ui.item.context.children[0].innerhtml; alert('old: ' + old + ' newc: ' + newc); } });
get td
of first column
var ntds = $('tr td:first', this);
Comments
Post a Comment