<?xml version="1.0"?>
<rss version="2.0">
 <channel>
  <title>Change background image for each new instance of a class. | WPDFD.com Forums</title>
  <link>http://www.wpdfd.com/forums/wpdfd/scripting/change_background_image_for_each_new_instance_of_a_class/</link>
  <description>A Scripting forum thread at WPDFD.com</description>
  <language>en-us</language>
  <pubDate>12/14/09, 348 13 2009 2009:%i:1260796396 13:13:16</pubDate>
  <lastBuildDate>05/21/70, 141 37 2570 2570:%i:18946359478 13:37:58</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>NineLabs Framework Feed Generator</generator>
  <managingEditor>sitemaster@wpdfd.com</managingEditor>
  <webMaster>sitemaster@wpdfd.com</webMaster>
     <item>
    <title>Mike Graham said:</title>
    <link>http://www.wpdfd.com/forums/wpdfd/scripting/change_background_image_for_each_new_instance_of_a_class/#p3193</link>
    <description><![CDATA[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.<br />
<br />
Example:<br />
[html]<br />
content **needs background-image: url(pic1.jpg)<br />
<br />
content **needs background-image: url(pic2.jpg)<br />
[/html]<br />
...<br />
etc.<br />
<br />
The page code is dynamically generated from our CMS, so can&#39;t change the HTML.<br />
<br />
I assume there is a way to accomplish this with Javascript, but I&#39;m a JS beginner at best.<br />
<br />
Thanks,<br />
Mike]]></description>
    <pubDate>12/14/09, 348 13 2009 2009:%i:1260796396 13:13:16</pubDate>
    <guid>http://www.wpdfd.com/forums/wpdfd/scripting/change_background_image_for_each_new_instance_of_a_class/#p3193</guid>
   </item>
   </channel>
</rss>
