我以前使用過.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