Firefox css:主动无法与sortable一起工作(适用于IE和Chrome)

时间:2014-09-30 20:18:49

标签: css jquery-ui firefox jquery-ui-sortable

通过示例解释更容易:http://jsfiddle.net/ymt9azmm/

问题:(在firefox中)当我单击td使用jquery sortable移动表中的行时,光标不会更改为“Pointer”:http://bit.ly/1sM8ewX

它适用于Chrome和IE-所以在Chrome中打开小提琴文件并查看差异

HTML:

<table border="1" id="sortable">
    <tbody class="ui-sortable">
        <tr id="order-4" style="opacity: 1;" class="">
            <td class="handle ui-sortable-handle"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 1</td>
            <td>name1</td>
        </tr>
        <tr id="order-4" style="opacity: 1;" class="">
            <td class="handle ui-sortable-handle"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span>Item 2</td>
            <td>name2</td>
        </tr>
    </tbody>
</table>

的CSS:

#sortable td:hover { 
    cursor: s-resize;
}
#sortable td:active{ 
    cursor: pointer;
}

js :(也是jquery&amp;&amp; jquery-ui)

$(function() {
    $( "#sortable tbody" ).sortable();
    $( "#sortable" ).disableSelection();
});

总结: css:#sortable td:active{cursor: pointer;}在FireFox中不起作用 光标不会变为指针。

如何在firefox中使其工作?

谢谢

1 个答案:

答案 0 :(得分:0)

我不知道这是否有帮助,但它不喜欢你的jquery。如果你拿出以下两行,它就可以了:

$("#sortable tbody").sortable();
$("#sortable").disableSelection();