我是jquery的新手,我有以下代码,但拖放功能无法正常工作。文本正在按预期更新,但拖动不起作用。请帮忙
$(document).ready(function(){
$("#title").keyup(update);
});
function update(){
var title = $("#title").val();
$("#Displaytitle").html(title);
$("#Displaytitle").draggable();
$("#Displaytitle").droppable({
drop: function(event, ui) {
var $text = $("#Displaytitle").text();
$(this).addClass("ui-state-highlight").find("p").html($text);
// $("#msg").hide();
}
});
}

<form>
<input name="title" type="text" class="click" id="title" value=" " size="25" />
<br/>
<img name="pic" class="click" id="photo" src="maritime.jpg" width="500" height="500" />
<!-- </select> where is the opening tag ? -->
<br/>
</form>
<!-- </div> where is the opening tag ? -->
<p id="Displaytitle"></p>
&#13;