Gam*_*fs2 -1 javascript jquery jquery-ui jquery-ui-dialog
我正在尝试从代码中打开一个对话框窗口.互联网上说要使用$("#dialog").对话框("打开"); 但由于某种原因,这是行不通的.
$( "#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
});
});
Run Code Online (Sandbox Code Playgroud)
我希望它在用户停止移动其中一个列表项时打开.警报发生但不是对话框.谁知道为什么?