我用bower安装了jquery-ui-draggable,但是它不工作。项目不可拖动。
<head>
<link rel="stylesheet" href="bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css">
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<script src="bower_components/jquery-ui-draggable/dist/jquery-ui-draggable.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<h2>Draggable Test</h2>
<br>
<button id="dragbtn">Drag me</button>
</body>Script.js
$(function(){
$(document).ready(function(){
$('#dragbtn').draggable();
});
})发布于 2016-07-12 18:18:39
尝尝这个
$( "#dragbtn" ).draggable({
cancel: false
});https://stackoverflow.com/questions/38324667
复制相似问题