I am making a simple print option, which, when pressed, calls the print function. The function copies according to the corresponding (not all) html.
function print() { var printWindow = window.open("", "Print", "status=no, toolbar=no, scrollbars=yes", "false" ); var toInsert = $("div.book").html(); $(printWindow.document.body).html(toInsert); }
The problem is that this new window doesn't seem to be able to link to my CSS stylesheet or my photos that are inside the folder. Any ideas? Just by focusing on the css issue, is it possible to insert <link ... /> at the beginning of a new window?
Thanks!
source share