Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用可拖动和可排序的 jQuery UI,当我单击要移动的项目时,我希望能够在 li 中添加文本,它显示了放置项目的位置,我已经设置了以下内容来演示:' -
http://jsfiddle.net/uJcB7/191/
干杯
绑定 sortable 的start事件:
start
$(function() { $( "#sortable" ).sortable({ placeholder: "ui-state-highlight", start: function(event, ui) { $("li.ui-state-highlight").text("your text"); } }); $( "#sortable" ).disableSelection(); });
小提琴。</p>
$("li").click(function(){ $(this).text("PLACE ON :" + place); });