Get HTML of selected object
Hey guys,
i try to get the HTML-Code of a selected element like $
('#id').toHTMLString(). This is needed to give a concated html-values
as param where only string is allowed.
I tried to do it this way:
(function($) {
/* jQuery object extension methods */
$.fn.extend({
toHTMLString: function() {
return this.clone().wrap('<b></b>').parent().html();
}
});
})(jQuery);
It breaks while trying to clone it. If I dont clone, it works pretty,
but it effects my original source (which i dont like to change). May
we fix this "bug" OR implement a .toString() functionality in the
core?! :-)
Thanks for your 2 minutes!
Sascha