Plugin to convert a jQuery object into an HTML string
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
MIT-LICENSE.txt
README.md
jQuery.toHTML.js
toHTML.jquery.json

README.md

jQuery-toHTML

By: Maxime Gibeau https://github.com/mgibeau/
Version: 0.1.1
Requires: jQuery 1.4.4+
License: MIT

Description

Plugin to convert a jQuery object into an HTML string.

Usage

$( {selector} ).toHTML( [options] );

N.B. If the selector matches multiple elements, the result will be a list of strings. See flat.

Example

HTML

<div>
  <p>Some sample text</p>
</div>

JavaScript

$('div').toHTML();

Output

"<div>
  <p>Some sample text</p>
</div>"

Options

flat

Merge multiple objects into a string
type: Boolean
default: false

$('div').toHTML(true);



Copyright (c) 2013, Maxime Gibeau https://github.com/mgibeau/