Monday, May 13, 2013

JQuery: remove content of div

To remove all the content of a div you can use .empty() function:

$('#mydiv').empty();

Reference:
http://stackoverflow.com/questions/652917/in-jquery-want-to-remove-all-html-inside-of-a-div


No comments: