You could chain a .css() to it. Set the x axis first with .css() and then the y axis with .animate() :

$(this)
  .css({backgroundPosition: '200px 0'})
  .animate({backgroundPosition:"(200px -50px)"}, {duration: 600})


--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Jul 10, 2009, at 6:57 PM, yo2lux wrote:


Hi,
The background position plugin by Alexander Farkas rocks!!
But I have a question.. Is possible to remove the animation for the X-
axis ? For example:

$(this).animate({backgroundPosition:"(200px -50px)"}, {duration: 600})

I don't want to animate the X-axis. I don't need 1 2 3 4 .... 200px..
I want to achieve 200px without any incrementation.

On the other side I need the animation on Y-axis.. I want to increment
to -50, something like -0 -1 -2 -3 -4 ..... etc...

I appreciate if someone try to help! Thanks!

Reply via email to