sortableJS/temp.js

16 lines
402 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var g1 = document.getElementById('g1');
var ops1 = {
animation: 1000,
delay: 30,
draggable: '.item',
filter: '.filter',
//拖动结束
onEnd: function (evt) {
console.log(evt);
//获取拖动后的排序
var arr = sortable1.toArray();
document.getElementById('msg').innerHTML = 'A组排序结果' + JSON.stringify(arr);
},
};
var sortable1 = Sortable.create(g1, ops1);