2
私はnestedSortableを使用していますが、それは正常に動作しますが、約1分使用した後、それは壊れてしまい、リスト全体を返しません。 Im toArrayを使用してデータをPHPスクリプトに戻してからmysqlを埋め込みますが、返された場合はjson値がリスト全体の更新でない場合、データベースが失われます。nestedSortable toArrayはセット全体を返しません
この奇妙な動作に問題がある人はいますか、何か間違っていますか?
$('#load').click(function(){
$.get("get_tags.php", function(data){
$("#data").html(data);
$('ol.sortable').nestedSortable({
disableNesting: 'no-nest',
forcePlaceholderSize: true,
handle: 'div',
helper: 'clone',
items: 'li',
maxLevels: 3,
opacity: .6,
placeholder: 'placeholder',
errorClass: 'error',
revert: 250,
tabSize: 25,
tolerance: 'pointer',
toleranceElement: '> div',
update: function() {
list = $(this).nestedSortable('toArray');
$("#result2").html(JSON.stringify(list));
$.post('x.php', { update_sql: 'ok', list: JSON.stringify(list) },
function(data){
$("#result").html(data);
},
"html")
}
});
});
});
プラグインの最終更新日は2011年5月11日です。http://mjsarfatti.com/sandbox/nestedSortable/ – NccWarp9
js関数で 'update'ではなく' relocate'イベントを使用しようとしましたか? – DOZ