I\'m trying to get this function to work on the website of a project I\'m working on. The purpose of this function is to only (physically) print the contents of a child div
Build a complete HTML page in the opened window and reference your CSS-file there:
var win = window.open('','printwindow'); win.document.write('Print it!'); win.document.write($("#content").html()); win.document.write(''); win.print(); win.close();