我尝试在页面上的一些div上使用可拖动效果,但无论何时加载页面,我都会收到错误消息:
Error: $(".draggable").draggable is not a function我到处看了看,似乎其他人也有这个问题,因为他们没有包含jQuery UI javascript文件,但我肯定有。
下面是我的页面的head标签:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script>    
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>有人能给出一个解决方案吗?
任何建议都很感谢。
谢谢。
快速编辑,我也有jquery工具js包括在页面的头部,如果我删除它的工作正常。有没有人能让这两个一起工作?
发布于 2013-10-08 14:53:25
此代码将不起作用(您可以检查firebug jQuery.ui未定义):
<script src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript"></script>    
<script src="jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script> 尝试使用以下代码:
<script src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript"></script>    
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script> 
<script src="jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>https://stackoverflow.com/questions/2895894
复制相似问题