【发布时间】:2015-04-09 10:13:47
【问题描述】:
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<style>
div{width:100px;height:100px;background:yellow;}
</style>
<script>
$(document).ready(function(){
$('div').draggable();
});
</script>
</head>
<body>
<div>Drag Me</div>
</body>
</html>
代码必须使用“jquery ui”提供“可拖动的 div”,但我的 div 不可拖动。有人能找到原因吗?
【问题讨论】:
-
使用 $( document ).ready(function() { insted of $document.ready(function(){
-
仍然无法工作,兄弟....已编辑。
-
你确定? works for me
-
谢谢哥们。我忘了在样式表中添加“http://”。哟哟!
标签: jquery jquery-ui draggable jquery-ui-draggable