2015-06-06 186 views
0

我使用这个demo示例,它有工作拖动和调整大小,但是当我下载它时只有拖动正在工作。jQuery可调整大小和可拖动的窗口无法调整大小

<html> 
<head> 
<meta http-equiv="content-type" content="text/html; charset=windows-1252"> 
<script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript" src="jquery-ui.js"></script> 
<link rel="stylesheet" type="text/css" href="jquery-ui.css"> 

<style>body,input{font-family:Calibri,Arial;margin:0px}h1{margin:0 0 0 20px}html,body,#container{height:100%}body>#container{height:auto;min-height:100%}#header{height:50px;background-color:#ddd;border-bottom:1px solid #aaa;width:100%}#footer{font-size:12px;clear:both;position:relative;z-index:10;height:3em;margin-top:-3em;text-align:center}.demo{width:150px;height:150px;padding:5px;background-color:#f81;position:absolute;top:150px;left:300px}#content{padding-bottom:3em}</style> 
</head> 
<body> 
<div id="container"> 
<div class="demo ui-draggable ui-resizable">Move Me!!... Resize Me!!...<div style="-moz-user-select: none;" unselectable="on" class="ui-resizable-handle ui-resizable-e"></div><div style="-moz-user-select: none;" unselectable="on" class="ui-resizable-handle ui-resizable-s"></div><div unselectable="on" style="z-index: 1001; -moz-user-select: none;" class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se"></div></div> 
</div> 
<script>$(function(){$('.demo').draggable().resizable();});</script> 
</body> 
</html> 

任何想法,为什么?

回答

0

请检查是否加载了所有的jquery库。

在这个demo我用jquery version 1.9.1jQuery UI 1.9.2。它的工作。

+0

噢谢谢你,事实证明我使用的是Jquery的错误版本,加载了你说的版本和它的工作。 – user2385608

相关问题