public
Description: A jQuery plugin for getting the outerHTML of an element.
Homepage: http://brandonaaron.net/
Clone URL: git://github.com/brandonaaron/jquery-outerhtml.git
jquery-outerhtml / jquery.outerhtml.js
100644 11 lines (10 sloc) 0.433 kb
1
2
3
4
5
6
7
8
9
10
11
/*! Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*/
 
(function($) {
 // Returns whether or not a result set has results in it
 $.fn.outerHTML = function() {
   return $('<div>').append( this.eq(0).clone() ).html();
 };
})(jQuery);