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

使用jQuery选择时将文本添加到列表项中,jquery,jquery-ui,list,text,Jquery,Jquery Ui,List,Text,我使用的是jQuery UI dragable and sortable,当我单击要移动的项目时,我希望能够在li中添加文本,它显示了项目的放置位置,我已经设置了以下内容来演示:'- 干杯绑定可排序的活动: 。 ​ 绑定可排序的事件: 。 ​ $(function() { $( "#sortable" ).sortable({ placeholder: "ui-state-highlight", start: function(event, ui) {

我使用的是jQuery UI dragable and sortable,当我单击要移动的项目时,我希望能够在li中添加文本,它显示了项目的放置位置,我已经设置了以下内容来演示:'-

干杯

绑定可排序的活动:

。 ​

绑定可排序的事件:

。 ​

$(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);
    });