Scripting: Change background image for each new instance of a class.
started by Mike Graham on Dec 14, 2009 — RSS Feed
Mike Graham
Posts: 1
I need to change the background-image (or possibly background-position) property of each new instance of a div with a particular class. I will have a set of images to choose from, or could create a sprite with all of the images.
Example:
[html]
content **needs background-image: url(pic1.jpg)
content **needs background-image: url(pic2.jpg)
[/html]
...
etc.
The page code is dynamically generated from our CMS, so can't change the HTML.
I assume there is a way to accomplish this with Javascript, but I'm a JS beginner at best.
Thanks,
Mike
Suresh Gupta
Posts: 63
I will recommend you to use the E-commmerce Software provided by Pulse Solutions
------------------
Link Building India
You must login to reply

