jquery-get-outer-html
provides a simple way to get the "outer HTML" for an element, including the element itself, even in browsers that do not support that natively. Unlike other plugins it does not include a setter for outerHTML, so it is best suited to those who do not need the extra code for a setter in their project.
$('.my-element').getOuterHTML();
You need jQuery, of course. jquery-getOuterHTML
is actively supported with jQuery 1.9 and 2.0 but should work fine with older versions.
jquery-get-outer-html
was created at P'unk Avenue for use in Apostrophe, an open-source content management system built on node.js. If you like jquery-get-outer-html
you should definitely check out apostrophenow.org. Also be sure to visit us on github.
Feel free to open issues on github.