Skip to content

Instantly share code, notes, and snippets.

@yagopv
Last active December 14, 2015 11:58
Show Gist options
  • Save yagopv/5082782 to your computer and use it in GitHub Desktop.
Save yagopv/5082782 to your computer and use it in GitHub Desktop.
Get outer HTML from jquery object
$element = $("<div><p>Hola</p></div><div><p>Hola</p></div><div><p>Hola</p></div>");
$('<div>').append($element.clone()).html();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment