I’ve looked around for this but I couldn’t find an answer, and I don’t have a clue how I would do it. What I am looking for is a JavaScript or jQuery script that will “move” a background image to the right in a div container, so that the pattern will have an “animated” effect.
How would it be possible to do this? I apologize if I have not explained the question in enough detail.
You can use the CSS
background-positionproperty to set the position of the background.Here’s a live example that moves the background one pixel to the right every quarter second, resetting when it reaches 100 pixels.
HTML:
CSS:
JavaScript: