Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A tiny outerHTML shim for jQuery

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 jquery.outerhtml.js
Octocat-spinner-32 readme.md Fixed docs January 16, 2012
readme.md

jQuery.outerHTML

Just like .html(), except that it lets you get the HTML of the target element, including the element itself.

Like .html(), you can replace the whole element by passing a value in.

Get

var markup = $('#myElement').outerHTML();

Set

$('#myElement').outerHTML('<div><p>New Stuff!</p></div>');

Something went wrong with that request. Please try again.