OK, I'm trying to include some animating backgrounds using Spritely as a test on my website but I'm having some problems.
For some reason, I cannot get the background to pan correctly.
I use this jQuery in my document ready event handler:
$('#bg_1').pan({fps: 30, speed: 2, dir: 'right'});
And then firebug gives me the following error:
$("#bg_1").pan is not a function
Now, this should work considering my JS spritely file appears to be linked properly.
If you would like to view the problem live here is the site URL: http://www.ma开发者_StackOverflow中文版rioplanet.com
Any ideas as to why pan() isn't recognized as a function?
OK everyone, for those that have this problem in the future here is what I have found:
For some reason, the compressed version of the Spritely jQuery plugin had a problem, as when I called the pan() method, it wasn't recognized as a function.
For some reason, downloading the full, uncompressed version instead of the compressed made it work beautifully!
Check out the effect here, it's pretty sick, and really easy to do! :) http://www.marioplanet.com
精彩评论