Skip to content

Instantly share code, notes, and snippets.

@tao4yu
Created November 13, 2013 03:05
Show Gist options
  • Save tao4yu/7443005 to your computer and use it in GitHub Desktop.
Save tao4yu/7443005 to your computer and use it in GitHub Desktop.
jQuery get element outer HTML。
outer_html = $('selector').clone().wrap('<p>').parent().html();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment