I'm using jquery.tablednd.0.7.min.js
to drag and drop table rows. When I add new row in table dynamically (i.e. with javascript add row) that new row did not drag n drop. Other rows that are already present in table can be dragged.
I think this new row is not being synched with jQuery drag n drop code.
I am adding new row like this.
This is jquery dragnDrop file code.
On page load I am using this code to assign this functionality to table
$(document).ready(function() {
$("#tableId").tableDnD({
onDragClass : "myDragClass",
onDrop : function(table, row) {
},
onDragStart : function(table, row) {
console.log("drag start");
}
});
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…