You can do this:
function newWindow_method_1() { var wi = window.open(); var html = $('.mainservice-page').html(); $(wi.document.body).html(html); } OR function newWindow_method_2() { var html = $('.mainservice-page').html(); window.open(html, "__new", "width=1000,height=1000"); } $('.menu div.profile-btn').on('click', function () { newWindow_method_1();
Hope this helps you.
source share