我在无法拖动某些项目的地方遇到 jquery ui 可排序问题(我猜是因为项目元素的高度)
<div class="container">
<fieldset>
<legend>handle 1 THIS CAN'T BE DRAGGED BELOW HANDLE 2</legend>
<div>blah<br /></div>
</fieldset>
<fieldset>
<legend>handle 2 BUT I CAN DRAG THIS ABOVE HANDLE 1</legend>
<div style="display: none">blah<br /></div>
</fieldset>
$(".container").sortable({
axis: 'y',
handle: '> legend',
containment: 'parent',
/*cursorAt: {top: 1},
start: function(event, ui) {
ui.placeholder.height(ui.item.height());
$(this).sortable('refreshPositions');
},*/
});
请参阅http://jsfiddle.net/ADyhR/10/ 编辑:它似乎在 jquery ui 1.8.9 中工作。它只是 1.8.18 中的一个错误吗?
注释掉的 javascript 行是我尝试过但没有奏效的东西,但我想我可能只是稍微偏离了我使用它们的方式。