2011-07-25 32 views

答えて

0

HTML:

<div id="tree"> 
    <ul id="createTree" class="droptrue"> 
    <li class="listTree ui-state-default" id="sortable">Title1 
     <ul class="droptrueInner"> 
      <li class="innerList ui-state-default">Green</li> 
      <li class="innerList ui-state-default">Yellow</li> 
      <li class="innerList ui-state-default">Black</li> 
      <li class="innerList ui-state-default">White</li> 
     </ul> 
    </li> 
    <li class="listTree1 ui-state-default" id="sortable1">Title2 
     <ul class="droptrueInner"> 
      <li class="innerList ui-state-default">Violet</li> 
      <li class="innerList ui-state-default">purple</li> 
      <li class="innerList ui-state-default">Pink</li> 
      <li class="innerList ui-state-default">Orange</li> 
     </ul> 
    </li> 
    </ul> 

Javascriptを:

$(function() { 
     $("ul.droptrue").sortable({ 
      connectWith: "ul.droptrue" 
     }); 
     $("ul.droptrueInner").sortable({ 
      connectWith: "ul.droptrueInner" 
     }); 
    }); 
+0

テストで:http://jsfiddle.net/QNkEL/ 9 / – jmav

関連する問題