Use .html() e.g.,
$("#topPromo").html("<p>Foo bar</p>");
http://docs.jquery.com/DOM/Attributes#html.28_val_.29
Scott
On 7/13/07, Danjojo <[EMAIL PROTECTED]> wrote:
<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");
});
--
.|..
Scott Trudeau
scott.trudeau AT gmail DOT com
http://sstrudeau.com/
AIM: sodthestreets