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.
function PrintElem(elem) {
Popup(jQuery(elem).html());
}
function Popup(data) {
var mywindow = window.open('', 'my div', 'height=400,width=600');
mywindow.document.write(' ');
mywindow.document.write('');
mywindow.document.write('');
mywindow.document.write(data);
mywindow.document.write('');
mywindow.document.close();
mywindow.print();
}
Print