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
This is great for changing elements on the dom but does NOT work for ie when passing in a html string into jquery like this:
$('Some content').find('#blog').outerHTML();
After some manipulation I have created a function which allows the above to work in ie for html strings:
$.fn.htmlStringOuterHTML = function() {
this.parent().find(this).wrap('');
return this.parent().html();
};