2012-05-12 104 views
1

我現在面臨的下一個問題與jQuery排序(在所有主要的瀏覽器工作正常,除了火狐)jQuery的排序Firefox的工作不降不重新排序

我有一個公共的UL結構就可以了4項立。人的名單顯示和工作正常,你可以將項目(火狐)很酷,(我解決了溢出-Y:汽車;問題也)當您嘗試將拖動項目拖放到新的位置,在Firefox中的問題開始, 「拖放區」不會出現,只有你可以拖動項目,我在幾篇文章中有研究。

jQuery UI sortable scroll helper element offset Firefox issue Firefox 4 Issue with jQuery UI Sortable jquery ui 1.8.16 & firefox 6 - sortable not working properly

但我不能找到解決辦法,我會告訴你這個問題看怎麼樣。 enter image description here

我的CSS,我想我要修改一下以下的方法:

#list-attributes{width:40%; margin:35px 15px 45px 10px; position:relative; overflow-y:auto;} 
#list-attributes li{background:#F7F7F7; padding:20px; color:#666; width:auto; border:1px solid #CCC; position:relative; text-indent:30px; height:25px} 
#list-attributes li div.icon{width:25px; height:35px; background:url(../img/search/sprite_search_filters.png) no-repeat; right:0; margin-right:10px; top:18px; position:absolute;} 
#list-attributes li div.getinshape{background-position: 0 -297px} 
#list-attributes li div.rekindlespiritually{background-position: 0 -357px} 
#list-attributes li div.relaxandunwind{background-position: 0 -417px} 
#list-attributes li div.gethealthy{background-position: 0 -477px} 
#list-attributes li span.msg{ text-indent:28px; line-height:1.8} 
#list-attributes li div.handler{color:#666; width:25px; height:25px; background:#00C4D9 url(../../dashboard/frontend/img/drag.png) no-repeat 5px 5px; cursor:move; display:inline-block; position:absolute; top:15px; left:8px} 

jQuery代碼:

  $("#list-attributes").sortable({ 
       update : function() { 
        $('#attributeItems').val($('#list-attributes').sortable('toArray')); 
        //$("#info").load("process-sortable.php?"+order); 
       } 
      }); 
+0

是否FF給任何JS錯誤,當你移動物品? – jimw

+0

沒有它不顯示這是:(越差任何錯誤,但在排序jQuery的網站能正常工作,這是辦法,我猜可能是一些與CSS文件.. – ncubica

回答

1

確定這就是答案,而我想說的是,這是一個很大的錯誤,我不知道爲什麼會發生。

在我的css文件中我在正文元素

overflow-y:scroll; overflow-x:hidden;

我只是刪除它從身體和排序開工,而且我不得不添加溢出:自動放入容器(通常UL)標籤。

這是爲了「跆拳道」的錯誤,但我發現它。希望未來有人能夠解決這個問題。如果你找到一個更好的方法來讓它知道。