0

Is it possible to animate a background images top position using jquery? I have tried -

 $('#intro1').animate({ background-position: 'top'}, 1000);

and

 $('#intro1').animate({ background-position: '0, 1600px'}, 1000);

But no luck with either - are there any available plugins / methods that anyone can recommend?

Dancer
  • 17,035
  • 38
  • 129
  • 206

1 Answers1

0

it' possible, try:

$("#element").animate({'background-position':'top'}, 1000);

and

$('#element').animate({
 'background-position-x':'0',
 'background-position-y':'1600px'
 }, 1000);

the - in javascript array object are not allowed and you have to convert it as string Good luck

Michael Antonius
  • 942
  • 2
  • 11
  • 20