我正在研究 html DnD 。我在互联网上看到了很多教程,并得到了一个示例 od DnD http://jsbin.com/axegem/1 。现在,在对这些页面的对象重新排序后,我想保存它,但我不知道如何才能做到这一点,请任何人都可以提供帮助。
谢谢!!
最佳答案
我做了更新:https://jsfiddle.net/f7fq7n94/
$("#draggable4").draggable({
containment: "#containment-wrapper",
scroll: false,
stop: function (event, ui) {
positions[this.id] = ui.position
localStorage.positions = JSON.stringify(positions)
}
});
$("#draggable5").draggable({
containment: "#containment-wrapper",
scroll: false,
stop: function (event, ui) {
positions[this.id] = ui.position
localStorage.positions = JSON.stringify(positions)
}
});
关于javascript - 我们如何在拖放更改后保存 html 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37810012/