jquery outerhtml innerhtml code example
Example 1: jquery select outer html
var outer_element_html = $('jQuerySelector')[0].outerHTML ;
console.log(outer_element_html);
Example 2: innerhtml jquery
var itemtoReplaceContentOf = $('#regTitle');
itemtoReplaceContentOf.html('');
newcontent.appendTo(itemtoReplaceContentOf);