This code works in IE Edge and the latest version of FF but not in the latest version of Chrome (it worked a few months ago, don't know which version I was on).
In Chrome the print preview page comes up but just shows a blank page.
I've tried Chrome print blank page but that didn't help. What else can I try?
jQuery('#print-me').click(function(){
var printPreview = window.open();
printPreview.document.open();
printPreview.document.write("<!DOCTYPE html>"+
"<html>"+
"<head>"+
"</head>"+
"<body><p>hello</p></body>"+
"</html>");
printPreview.document.close();
printPreview.print();
printPreview.close();
return false;
});