Posted By


crutzdesigns on 02/04/11

Tagged


Statistics


Viewed 179 times
Favorited by 0 user(s)

jQuery().toHTMLString


/ Published in: jQuery
Save to your folder(s)

Gets the currently selected element as a string.

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


Copy this code and paste it in your HTML
  1. jQuery.fn.extend({
  2. toHTMLString: function() {
  3. return $('<div>').append(this.clone()).remove().html();
  4. }});

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.