我遇到了一个问题,就是无法使对话框可拖动和可调整大小。所有的文档和问题都让它听起来很简单,但我无法使它正常工作。你有什么想法,我可能做错了什么吗?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<SCRIPT TYPE="text/javascript" SRC="js/jquery-ui-1.8.10.custom.min.js"></SCRIPT>
<SCRIPT TYPE="text/javascript">
$(document).ready(function(){
$('#dialog-form').dialog({
// autoOpen: false,
height: 400,
width: 350,
modal: true,
draggable: true,
resizable: true,
buttons: {
Cancel: function() {
$( this ).dialog( "close" );
}
},
close: function() {
alert('here');
}
});
});
</SCRIPT>
<link type="text/css" href="css/smoothness/jquery-ui-1.8.10.custom.css" rel="stylesheet" />
<style>
#dialog-form label {float:left; width:100px;}
</style>
</head>
<body>
<div id="dialog-form" title="Create new product">
<form>
<fieldset>
<label for="pt">Product Type</label>
<input type="text" name="pt" id="pt" class="text ui-widget-content ui-corner-all" />
<br>
<label for="prod">Producer</label>
<input type="text" name="prod" id="prod" class="text ui-widget-content ui-corner-all" />
</fieldset>
</form>
</div>
</body>
</html>