2010-09-11 39 views
0

基本上創建一個文件管理器。用戶點擊瀏覽,並從服務器填充文件夾和文件,並顯示爲圖標。我希望能夠通過文件夾拖動文件,然後運行我的服務器文件移動腳本。我得到的文件拖到工作,但是當我移動一個文件夾上它拿起所有的文件夾..jquery多個droppables

這裏,所以當我拖過一個文件夾所有文件夾獲取選中的文件夾代碼

$('.gallery_container').live("mouseover",function() { 
    $(this).find("li.folder").each(function (intIndex){ 
     if (!$(this).data("init")) { 
     $(this).data("init", true); 
     $(this).droppable({ 
      accept: '.gallery li.file', 
      activeClass: 'selected', 
      drop: function(ev, ui) { 
       droppedWorkout(ui.draggable,$(this)); 
      } 
     }); 
    } 

     }); 
    }); 

類應用於它時,它不應該?

任何幫助將不勝感激。

感謝

回答

0

你有activeClass: 'selected',但你需要hoverClass: 'selected'

+0

真棒謝謝! – Alessandro 2010-09-16 04:16:49