它从页面顶部工作正常。
但是一旦页面滚动,并且在可排序列表中拖动该部分,该部分似乎不会出现在光标的位置。
$(document).ready(function(){
$('#accordionOne').sortable({
start: function (e, ui) {
// modify ui.placeholder however you like
// ui.placeholder.html("I'm modifying the placeholder element!");
placeholderHeight = ui.item.outerHeight();
ui.placeholder.height(placeholderHeight + 15);
$('<div class="slide-placeholder-animator" data-height="' + placeholderHeight + '"></div>').insertAfter(ui.placeholder);
},
placeholder: "ui-state-highlight",
update: function(event, ui) {
var newOrder = $(this).sortable('toArray').toString();
console.log("data",newOrder);
var posting = $.post('/support_sections/update_order', {order:newOrder, position:'left'});
// Put the results in a div
posting.done(function( data ) {
console.log("data",data);
});
}
});});
答案 0 :(得分:2)
从正文中删除溢出:隐藏 祝你好运....