代码:
<!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();功能不工作。我已经将它放在一个<div>中,并使用jQuery来尝试让这个<p>工作。但是,这段代码有问题,它不能输出.draggable();函数。能帮我个忙吗?谢谢。
发布于 2015-08-10 18:51:53
在您的代码中添加jquery-ui.js :作为参考,您可以查看以下内容:Fiddle
代码如下
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>除此之外,所有的代码都是一样的。
https://stackoverflow.com/questions/31917313
复制相似问题