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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -