我正在尝试将可拖动对象添加到简单的 html 页面。
IE 给出:对象不支持此属性或方法
FF 给出: jQuery(".dragthis").draggable 不是一个函数
使用最新的jquery解压。 这是代码:
<html>
<head>
<script src="jquery.js"></script>
<script>
$(document).ready(function () {
jQuery(".dragthis").draggable();
jQuery(".drophere").droppable();
});
</script>
<style>
.dragthis {
}
.drophere {
}
</style>
</head>
<body>
<div class="dragthis">dragthis</div>
<div class="drophere">drophere</div>
</body>
</html>
我做错了什么?
最佳答案
您需要包含 jQuery UI library .
关于jQuery 可拖动错误 : Object doesn't support this property or method,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/292635/