Skip to content

Instantly share code, notes, and snippets.

@zirosas
Created February 7, 2014 04:21
Show Gist options
  • Save zirosas/8857337 to your computer and use it in GitHub Desktop.
Save zirosas/8857337 to your computer and use it in GitHub Desktop.
$("#foo")
.clone() //clone the element
.children() //select all the children
.remove() //remove all the children
.end() //again go back to selected element
.text();
@csharpforevermore
Copy link

Haha I was about to copy that sample too. Really good to see someone else building up their SO Gists!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment