2009-08-26 4 views
0

가 나는 중첩 정렬 목록 : 원함에 드롭 할 수 있도록 내가 그렇게 UI 정렬 끌어 목록에 걸쳐 놓을 수 있도록하기 위해 노력하고있어jQuery를 UI 정렬 해제 문제

<ul class="testSortable"> 
    <li class="ui-state-default" rel="1">What Can I Say? 
     <ul class="testSortable" rel="1"> 
      <li class="ui-state-default" rel="4">Total Divisions 
      <ul class="testSortable" rel="4"></ul> 
      </li> 
     </ul> 
    </li> 
</ul> 

을, 문제는 그것을하고있다 자식 요소를 생성하고 전체 노드를 사라지게합니다.

$('.testSortable').sortable({ 
axis:  'y', 
cursor:  'move', 
connectWith: '.testSortable', 
placeholder: 'ui-state-highlight',   
start: function(evt, ui){ 
    $(ui.item).children(".testSortable").sortable('disable'); 
}, 
stop: function(evt, ui){ 
    $(ui.item).children(".testSortable").sortable('enable'); 
} 
}); 

이 요소가 비활성화로 표시가 자식 클래스를 만드는 것처럼 보이지만, 실제로는 아무것도 해제하지 않기 때문에 자리는 불투명하지만 당신은 여전히 ​​떨어질 수 있습니다

내 현재 코드입니다 자식 요소.

제안 사항?

답변

0

실제로 노드를 사용하지 않도록 설정하는 방법을 찾은 후에 해결 방법을 찾았습니다.

start: function(evt, ui){ 
    $(".testSortable", ui.item).hide();    
}, 
stop: function(evt, ui){ 
    $(".testSortable", ui.item).show();    
} 

주로 정렬 된 옵션이 최종 위치로 이동 될 때까지 하위 노드를 숨 깁니다.