How can you use jQuery to create the effect of sliding a repeated background-image between divs?
Take a look at this simple fiddle I made. I’m using the addClass / removeClass jQuery functions in combo with CSS to change which div has the background-image. That all works fine.
But what if I wanted to animate the sliding of the background image between each div?
You can make a background div that gets animated behind the text:
JS–
HTML–
CSS–
Here is a demo: http://jsfiddle.net/Hwvsb/3/