Update text inside a div
How do I update <h2>
text inside a particular div?
<div id="outerwrapper">
<div id="wrapper>
<h2></h2>
</div>
</div>
$('#wrapper').text("new text");
How do I update <h2>
text inside a particular div?
<div id="outerwrapper">
<div id="wrapper>
<h2></h2>
</div>
</div>
$('#wrapper').text("new text");
Answers 1
Try this:
And you've missed a quotation here:
<div id="wrapper>
Code should be like this: