Skip to content

Instantly share code, notes, and snippets.

@wilhelm-murdoch
Created May 30, 2011 14:12
Show Gist options
  • Save wilhelm-murdoch/998954 to your computer and use it in GitHub Desktop.
Save wilhelm-murdoch/998954 to your computer and use it in GitHub Desktop.
IE's 'outerHTML' method for jQuery
jQuery.fn.outerHTML = function() {
return $('<div>').append(this.eq(0).clone()).html();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment