1
ページの先頭から正常に動作します。
しかし、一度ページがスクロールされ、セクションがソート可能なリストにドラッグされると、セクションはカーソルの位置に表示されません。jQuery UIページ下部からドラッグするとソート可能な問題
$(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);
});
}
});});
少し説明が役立ちます。 – showdev