jquery copy element vs outer html code example
Example 1: jquery select outer html
var outer_element_html = $('jQuerySelector')[0].outerHTML ;
console.log(outer_element_html);
Example 2: get selected element html jquery
$('.classSelector')[0].outerHTML