ここに私が取り組んでいるJSfiddleがあります。
各アイテムをそれらの間で出し入れできる2つのリストを作成しようとしています。変更は、更新機能/ソートステータスdiv領域内で下に更新されます。
3 行目の最初のアラートは機能しますが、5 行目のクリック関数を呼び出すと、6 行目のアラートは機能しません。全体的に、コードに何かが欠けているか、セミコロンなどがずれている可能性があると思います。助けてフィードバックを残してください、ありがとう。
$(document).ready(function() {
alert(0);
$(".shopping_list").onclick(function() {
alert(1);
$("#names #places").sortable({
containment: 'parent',
tolerance: 'pointer',
cursor: 'pointer',
revert: true,
opacity: 0.60,
connectWith:"#names #places",
update: function(event, ui) {
content = $(this).text();
$('#sort_status').text(content);
}
})
});
});