lisovaccaro
lisovaccaro

Reputation: 33956

Cross-browser background Y position animation?

I'm currently using this to animate background positions:

$('#icon' + n).animate({ backgroundPositionY : "-=5px" }, 250 );
$('#icon' + n).animate({ backgroundPositionY : "+=5px" }, 250 );

Chrome is warning me backgroundPositionY will be deprecated, also it get's buggy if zoom is different than 100% and Firefox and Explorer don't even run the animation.

What is the correct method to animate background Y position?

Upvotes: 2

Views: 311

Answers (1)

charlietfl
charlietfl

Reputation: 171669

There are lots of readily available plugins for background animation...dig into their source to see what methods they use

Upvotes: 1

Related Questions