Possible Duplicate:
jquery.animate background-position doesn't work
I have a small script that animates background positions, sadly it doesn’t work in FireFox.
It works in IE and Chrome.
$('#background').animate({
'background-position-x': -1020
});
How come it doesn’t work in FireFox?
Thanks in advance!
You can always create your own little plugin, it’s not that hard.
Using jQuery 1.8 we now have access to the $.Animation method that gives us the animated values directly without to much work, so we can do something like :
And then to use it we can do:
live example:
$(“#background”).animateBG(“0px”, “-45px”, 300);
FIDDLE
Disclaimer: This is not a finished and tested plugin, but something I spent ten minutes creating in jsFiddle, but test it out and do the changes you need to, and it should work just fine for you.