由于某种原因,我收到此错误消息:
Uncaught TypeError: Object #<an Object> has no method 'pan'
对于这行代码:
$('#bg_1').pan({fps: 3, speed: 2, dir: 'right'});
我已经在这行代码之前连接了 spritely 插件,如下所示: http://www.marioplanet.com/index.asp
有什么想法吗?
最佳答案
您在页面中包含 jQuery 两次,一次是在此处(第 12 行,在 <head>
中):
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
这里再次(第 91 行,在 <body>
中):
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
第二次出现是清除插件,只需删除第 91 行 <script>
来解决它。
关于jquery - 错误: Uncaught TypeError: Object #<an Object> has no method 'pan' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3629909/