1

I have a set of code which animates the background image of a container by manipulting the BackgroundPosition.

I cannot for the life of me figure out how to keep the Y Position at 0px, as my current code defaults to %50. (Meaning I get Background-Position: AnimatedValue, %50;)

Animate: function (target) {
    $('#wrapper').animate({ backgroundPosition: (((width / 10) * -1) * targetIndex) }, currentDuration, easing);
},

What do I need to change?

Wesley
  • 5,381
  • 9
  • 42
  • 65
  • `.animate({ backgroundPosition: (((width / 10) * -1) * targetIndex)+', 0px' }, 100);`, or use the step method or try this [answer](http://stackoverflow.com/questions/12340130/jquery-animate-background-image-on-y-axis/12340191#12340191)! – adeneo Sep 25 '12 at 23:14

0 Answers0