[英]jquery-ui draggable doesn't work inside an ajax block
我似乎无法在放置块内的ajax块内更改_drag选项。 将jQuery 1.6和1.7与jQuery ui 1.8.6和1.8.16一起使用。
$('div.equippment').droppable({
accept: 'div.my_wep, div.store_wep',
tolerance: 'intersect',
drop: function(e, ui) {
var _drop = $(this), _drag = ui.draggable, _class = _drag.attr('class'), _swapsell = false, _dragid = _drag.find('img').attr('name');
$.ajax({
type: 'POST',
dataType: 'json',
url: _url,
data: ({to_inv: _from_store, slot: _drop.attr('id').replace('slot_','')}),
success: function(data) {
_drag.draggable("option","revert",true); // Doesn't work yay
}
});
}
});
您有任何错误吗? 看起来您需要关闭成功功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.