javascript - How to remove a div's content with jQuery -
how go removing content inside div tag class content
.
<div class="content"></div>
i imagine like:
$(.content).remove
separately, how go adding string of text inside same div
?
use .empty()
remove contents in div tag.
$('.content').empty();
for second question; can add text or content using $('.content').html(newcontent)
or
$('.content').text(newcontenttext); //specifically text content.
Comments
Post a Comment