저는 jQuery에 조금 익숙해 누군가가 나를 도울 수 있기를 바랍니다.jQuery droppables - 드롭 요소 변경
(li)을 삭제 한 후에 다른 요소 (div)로 요소 (li)을 변경하려고합니다.
샘플 코드 : 제가
drop: function(ev, ui) {
$(ui.draggable).replaceWith("<div>Some content</div>");
}
상기 기능이 트리거 될 때 원래 드래그 요소가 비활성화 될 때를 사용
$("#inputEl>li").draggable({
revert: true,
opacity: 0.4,
helper: "clone"
});
$("#dropEl")
.droppable({
accept: ".drag",
hoverClass: "dropElhover",
drop: function(ev, ui) {
// change the li element to div here
}
});
문제가있다.
저는 최신 jQuery 및 jQuery UI 안정 버전을 사용하고 있습니다.