我以前使用过.draggable()
函数,并且它以前的工作正常。但是这次它甚至没有工作。我不知道为什么?.draggable不能在div上工作
这是我的jQuery的链接
<script src="https://code.jquery.com/jquery-2.1.1.js"></script>
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<link rel="stylesheet" href="https//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
这是我的HTML代码
<div class="mainArea" id="response">
<div class="designer">
<?php include"shirtBasic.svg" ?>
<div id="imageDiv"> </div>
<div id="dragDiv"> </div>
</div>
<table width="100%" border="0" id="sizeBar">
<tr>
<td class="leftBarButton" style="width:50%">Front</td>
<td class="leftBarButton" style="width:50%">Back</td>
</tr>
</table>
</div>
,这是jQuery的
$(document).ready(function() {
$(function() {
$('#dragDiv').draggable();
});
});
这是不是唯一的代码有HTML和jQuery之上和之下的其他代码,但不相关。
请帮我看看问题,并建议如果我已经链接了正确的jQuery版本,如果有更新的可用,请赐教。
你为什么包括两个版本的jQuery? – j08691 2014-08-29 19:28:09
@ j08691老实说,这些版本和他们的名字一直困惑我请指出一个删除? – 2014-08-29 19:28:59
2个版本的jquery可能会导致冲突。你应该保持第一个。不要删除UI – 2014-08-29 19:29:52