I\'m trying to get the HTML of a selected object with jQuery. I am aware of the .html() function; the issue is that I need the HTML including the selected obje
.html()
Extend jQuery:
(function($) { $.fn.outerHTML = function() { return $(this).clone().wrap('').parent().html(); }; })(jQuery);
And use it like this: $("#myTableRow").outerHTML();
$("#myTableRow").outerHTML();