我正面临 jQuery sortable 的下一个问题(在除 Firefox 之外的所有主要浏览器中都可以正常工作)
我有一个常见的 ul 结构,上面有 4 个 li 项目。al 列表显示和工作正常,您可以拖动项目(firefox)很酷,(我解决了溢出-y:auto;问题也)当您尝试将可拖动项目放到新位置时,问题开始,在 firefox 中, “放置区”不会出现,只有您可以拖动项目,我在几个帖子中进行了研究。
jQuery UI 可排序滚动辅助元素偏移 Firefox 问题 Firefox 4 jQuery UI 可排序 jquery ui 1.8.16 和 firefox 6 问题 - 可排序无法正常工作
但是我找不到解决方案,我将向您展示问题的外观。
我的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);
}
});