出于某种原因,我收到此错误消息:
Uncaught TypeError: Object #<an Object> has no method 'pan'
Run Code Online (Sandbox Code Playgroud)
对于这行代码:
$('#bg_1').pan({fps: 3, speed: 2, dir: 'right'});
Run Code Online (Sandbox Code Playgroud)
我在这行代码之前连接了spritely插件,如下所示:http: //www.marioplanet.com/index.asp
有任何想法吗?
You're including jQuery twice in the page, once here (line 12, in the <head>):
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
and again here (line 91, in the <body>):
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
第二次发生是擦除插件,只需删除第91行<script>来解决它.