Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 339 Bytes

readme.md

File metadata and controls

14 lines (10 loc) · 339 Bytes

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>');