使用jQuery选择时,将文本添加到列表项中

我正在使用jQuery UI可拖动和可排序,当我单击要移动的项目时,我希望能够在li中添加文本,它显示了放置项目的位置,我已经设置了以下内容来演示:’ –

http://jsfiddle.net/uJcB7/191/

干杯

绑定sortable的start事件:

 $(function() { $( "#sortable" ).sortable({ placeholder: "ui-state-highlight", start: function(event, ui) { $("li.ui-state-highlight").text("your text"); } }); $( "#sortable" ).disableSelection(); }); 

小提琴 。

  $("li").click(function(){ $(this).text("PLACE ON :" + place); });