Friday, September 30, 2011

empty()

empty() returns jQuery

Removes all child nodes from the set of matched elements.

Example:

$("p").empty()

HTML:
<p>Hello, <span>Person</span> <a href="#">and person</a></p>

Result:
[ <p></p> ]

No comments:

Post a Comment