<div id="topPromo"> <p class="centered"><img src="images/top_promo.jpg"></p> </div>
How do I go about using Jquery to change the contents of a div? Sometimes I may want it to be: <div id="topPromo"> <p>Lipsum ernum hoki doki...</p> </div> Other times: <div id="topPromo"> <p class="centered"><img src="images/new_product_pictuer.jpg"></p> </div> I have the basics of JQuery going and have done some basic tutorials like. $(document).ready(function() { // highlights image borders we have specified with the imgBorder class $(".imgBorder").hover(function() { $(this).addClass("boldOutline"); },function(){ $(this).removeClass("boldOutline"); });