【问题标题】:.draggable(); functionality not working.draggable();功能不工作
【发布时间】:2015-08-10 10:33:23
【问题描述】:

代码:

<!DOCTYPE html>
<html>
<head>
<title>Project 507</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<style type="text/css">
#draggable {
width: 150px;
height: 150px;
}
</style>
<script type="text/javascript">
$(document).ready(function () {
$("#draggable").draggable();
});
</script>
</head>
<body>
<div id="draggable">
<p>Compose new Tweet</p>
</div>
</body>
</html>

.draggable(); 功能不起作用。我将它放在&lt;div&gt; 中,并使用jQuery 尝试使&lt;p&gt; 工作。然而,这段代码有问题,它没有输出.draggable(); 函数。请问我能得到一些帮助吗?谢谢。

【问题讨论】:

    标签: javascript jquery jquery-ui-draggable


    【解决方案1】:

    在您的代码中添加 jquery-ui.js : 作为参考,你可以看看这个: Fiddle

    代码如下

    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    

    除此之外,所有代码都相同。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-13
      • 1970-01-01
      相关资源
      最近更新 更多