Return to Snippet

Revision: 40603
at February 4, 2011 08:26 by crutzdesigns


Updated Code
jQuery.fn.extend({
  toHTMLString: function() {
    return $('<div>').append(this.clone()).remove().html();
}});

Revision: 40602
at February 4, 2011 07:37 by crutzdesigns


Updated Code
jQuery.fn.extend({
  toHTMLString: function() {
    return $('<div>').append(this.clone()).remove().html();
  });

Revision: 40601
at February 4, 2011 07:18 by crutzdesigns


Initial Code
$.fn.extend({
  toHTMLString: function() {
    return $('<div>').append(this.clone()).remove().html();
  });

Initial URL


Initial Description
Gets the currently selected element as a string.

Usage:
$("div#item1").toHTMLString();

Initial Title
jQuery().toHTMLString

Initial Tags


Initial Language
jQuery