我正在尝试创建一个模式对话框来显示内容(某种或其他的 html):
<script>
$.fx.speeds._default = 1000;
$(function() {
$( "#dialog" ).dialog({
autoOpen: false,
closeOnEscape: true,
modal: true,
position: 'center',
width: 800,
height: 600,
show: "blind",
hide: "explode"
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
return false;
});
});
</script>
当我查看页面时,对话框是内联的,而不是隐藏的。这是我的html:
<div id="dialog">This is my dialog that should be hidden until called</div>
<button id="opener">I Open the Dialog</button>
我究竟做错了什么?