I\'ve this function for my Wordpress plugin uses jQuery that prints the content from the div with class \"table_disp\". How can I print the css style along with it.
Append Stylesheet instead
var css= '';
var printContent = document.getElementById("printContentID");
var WinPrint = window.open('', '', 'width=900,height=650');
WinPrint.document.write(printContent.innerHTML);
WinPrint.document.head.innerHTML = css;
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();