是否可以在stop函数中调用sort函数内部的变量或函数?排序时需要查找ui.item的位置,所以在stop函数内部找不到ui.item.position()。
另外,这是什么类型的函数?embedded是我能想到的全部。
sort().variableName
event.sort(variableName);
event.sort().variableName;
$('.thing').sortable().sort(); // this is the closest I have gotten
但这些尝试都失败了。
$('.thing').sortable({
sort: function(event, ui) {
var variableName = ui.item.position();
},
stop: function(event, ui) {
// call variableName.left
}
});https://stackoverflow.com/questions/56065530
复制相似问题