Skip to content

mgibeau/jQuery-toHTML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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/

About

Plugin to convert a jQuery object into an HTML string

Resources

License

Stars

Watchers

Forks

Packages

No packages published