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 
    } 
+0

솔루션을 찾았습니까? –

답변

2

같은 이벤트 뭔가를 사용하여 ... 또는 이벤트의 속성을 사용할 수 있습니다 대신 직접 수행하여

관련 문제