Skip to content

Instantly share code, notes, and snippets.

@thekarel
Created September 25, 2013 15:53
Show Gist options
  • Save thekarel/6701735 to your computer and use it in GitHub Desktop.
Save thekarel/6701735 to your computer and use it in GitHub Desktop.
Get selected elements full HTML (not the inner, .html()) -- From http://stackoverflow.com/questions/2419749/get-selected-elements-outer-html
$('A').each(function(){
var s = $(this).clone().wrap('<p>').parent().html();
console.log(s);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment