JSFiddle - React, Tailwind, and code Playground

HTML

<div class="logoHolder">
  Logo
</div>
<button id="btnPrint">
  Button
</button>

JavaScript

$("#btnPrint").click(function(){
  $(".accordion-content").css('display','block');
  var printWindow = window.open('', '', 'height=400,width=1200');
  var cssFile = 'http://cdn.sstatic.net/stackoverflow/all.css?v=544053bd81fe';//Replace with your absolute path
  var html = ''+
  	'<html>'+
    '<head>'+
    '<link rel="stylesheet" type="text/css" href="'+cssFile+'"/>'+
    '</head>'+
    '<body onload="window.focus();" onbeforeunload="window.close();">'+
  	$(".logoHolder").html();
  $('input[class="subCheck"]:checked').each(function() {
    html += $("#"+this.value).html()+"<br><br><br>";
  });
  html += '</body></html>';
  //printWindow.document.write(html);
  printWindow.document.body.innerHTML = html;
  var img = document.createElement('img');
  printWindow.document.body.appendChild(img);
  img.style.display = 'none';
  img.onerror = function(){
	  printWindow.print();
  };
  img.src = cssFile;
});