jquery animation, creating constantly looping action

lexusgs430
lexusgs430 used Ask the Experts™
on
Hi,

Working on designing a site. Had a pretty cool idea. Id like to use jquery to adjust the background position style property of a div (moving it in a constant upward motion, no left-right movement), at a slow but smooth looking pace. Basically Id like for the background position of the background-image tag (which will be repeating), to move say .1 pixel per second (if its possible to do at that interval).

Id try writing this myself but Im terrible with anything other than jquery selectors and basic operations, and I figure that someone smarter than me could likely figure out the script with ease. So anyways, if you could help, it would be appreciated greatly!

(p.s., the dimensions of the background-image im attempting to animate are 1100 width x 500 high, and once again im trying to make it move upwards in a loop, so that when its moved to -1, the first pixel of the repeated image moves into the space from the bottom.)


^
^
^
^

Like that, in case I just overcomplicated my explanation :)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Consultant & Challenge Subduer
Top Expert 2009
Commented:
Check out the Spritely jQuery plugin: http://spritely.net/

I should also mention that most browsers don't allow fractional pixels.

Author

Commented:
damn, thats really close to what im trying to do, only the exact opposite direction :) (horizontal not vert.)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial