title: Random background image for div
body: <p>I have an ASP.NET site that shows a number of products from a database. At the moment the background image for each product is set in CSS in the productBox class. What I would like is for each product to have a random background image from a selection of 4 images. I'm thinking that using jquery would be the way forward ?</p>
  
  <pre><code>&lt;div class="productBox"&gt;
    &lt;div class="productouter"&gt;
        &lt;div class="productImageContainer"&gt;
          &lt;a id="ctl00_ContentPlaceHolder1_catalogList_dlCatalog_ctl01_hlImageLink" class="productImage" href="Product-Flea-Monkey-Jacket_23.aspx"&gt;&lt;img src="repository/product/thumbs/150x150_NB701-FLEA-MONKEY-JACKET-close-front.jpg" style="border-width:0px;" /&gt;&lt;/a&gt;
        &lt;/div&gt;
  
        &lt;div class="productinner"&gt;
            &lt;a id="ctl00_ContentPlaceHolder1_catalogList_dlCatalog_ctl01_hlProduct" class="catalogProductName" href="Product-Flea-Monkey-Jacket_23.aspx"&gt;Flea Monkey Jacket&lt;/a&gt;
  
            &lt;span id="ctl00_ContentPlaceHolder1_catalogList_dlCatalog_ctl01_lblOurPrice" class="ourPrice"&gt;£ 96.00&lt;/span&gt;
  
            &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>