3
over 이벤트를 사용할 때 어떻게 현재의 droppable을 얻을 수 있습니까? 현재의 droppable로 나는 콘테이너가 잠시 동안 공중 선회한다는 것을 의미합니다. 여기 정렬 할 수있는 이벤트가 현재의 droppable을 얻습니다.
분명 일을 내 코드입니다 :$('#widgets-available, #sidebar-drop, #content-drop, #footer-drop').sortable({
start: function(event, ui) {
item = ui.item;
newList = oldList = ui.item.parent().parent();
},
over: function(event, ui) {
//Get Current droppable??
}
}).disableSelection();
을});
over: function(event) {
var myDroppable = event.target; //this is element where it's being dropped
var mySortable = event.toElement; //this is the "handle" element that fired the sort event in the first place.
}
희망 : 찾은 내용을 '이'다음
over: function(event, ui) {
$(this).find('.numdrag').size(); // give the count of elements with class .numdrag in the drop area
}
솔루션을 찾았습니까? –