0
드롭 블록 안의 아약스 블록에서 _drag 옵션을 변경할 수 없습니다. jQuery와 1.8 및 1.8.16을 사용하여 jQuery 1.6 및 1.7을 사용했습니다.jquery-ui draggable이 아약스 블록 내에서 작동하지 않습니다.
$('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
}
});
}
});
복사하여 붙여 넣기 실수가 수정되었습니다. 처음에 성공 블록에서 "}"을 닫지 않았습니까? 감사 :) – user766987