有以下简单的div:
<div id="dialogg">
Hello, world!
</div>
一些 CSS 样式:
#dialogg {
display: none;
}
和jQuery代码:
<script src="assets/js/jquery-1.9.1.min.js"></script>
<script src="assets/js/jquery-ui-1.10.2.custom.js"></script>
<script src="assets/js/jquery-ui-1.10.2.custom.min.js"></script>
<script type="text/javascript">
$(function() {
$('#dialogg').dialog({
autoOpen: false;
width: 400;
});
$('#dialogg').dialog('open');
});
</script>
但我看不到任何对话框!我该如何解决?怎么了?
更新:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Исторический турнир</title>
<link rel="stylesheet" type="text/css" href="assets/css/main-styles.css">
<link rel="stylesheet" type="text/css" href="assets/css/departments-page-styles.css">
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="assets/js/jquery-1.9.1.min.js"></script>
<script src="assets/js/jquery-ui-1.10.2.custom.min.js"></script>
<script type="text/javascript">
$(function() {
$('#dialogg').show();
$('#dialogg').dialog({
autoOpen: false;
width: 400;
});
$('#dialogg').dialog('open');
});
</script>
</head>
但是这段代码仍然不起作用。