I am working on an ASP.NET website that displays products from a database. Currently, the background image for each product is set in CSS within the productBox class. I would like to have a random background image out of a selection of 4 images for each product. I believe using jQuery might be the best approach for this.
<div class="productBox">
<div class="productouter">
<div class="productImageContainer">
<a id="ctl00_ContentPlaceHolder1_catalogList_dlCatalog_ctl01_hlImageLink" class="productImage" href="Product-Flea-Monkey-Jacket_23.aspx"><img src="repository/product/thumbs/150x150_NB701-FLEA-MONKEY-JACKET-close-front.jpg" style="border-width:0px;" /></a>
</div>
<div class="productinner">
<a id="ctl00_ContentPlaceHolder1_catalogList_dlCatalog_ctl01_hlProduct" class="catalogProductName" href="Product-Flea-Monkey-Jacket_23.aspx">Flea Monkey Jacket</a>
<span id="ctl00_ContentPlaceHolder1_catalogList_dlCatalog_ctl01_lblOurPrice" class="ourPrice">£ 96.00</span>
</div>
</div>
</div>