[英]jQuery UI dialog open
I'm trying to open a dialog window from code. 我正在尝试从代码中打开一个对话框窗口。 The internet says to use $("#dialog").dialog("open"); 互联网说使用$(“#dialog”)。dialog(“ open”); but for some reason this isn't working. 但是由于某种原因,这是行不通的。
$( "#draggable" ).draggable({
connectToSortable: "#sortable",
helper: "clone",
revert: "invalid",
stop: function(event, ui) {
alert("Hello World!");
$("dialog").dialog('open');
}
});
$( "ul, li" ).disableSelection();
});
$(function() {
$("#dialog").dialog({
autoOpen: false,
height: 200,
width: 150
});
});
I want it to open when a user stops moving one of the list items. 我希望在用户停止移动列表项之一时将其打开。 The alert occurs but not the dialog. 发生警报,但没有对话框。 Anyone know why? 有人知道为什么吗?
你错过了#
$("#dialog").dialog('open');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.