I have a print button with id="print_req"
. I wrote some Javascript code for printing a page, which is triggered by clicking on this button, and I also want to hide this button before printing, and show it after whole printing process.i mean not to print button in my printed document. Here is my code:
$(document).ready(function(){
$("#print_req").click(function(){
$("#print_req").css("display","none");
window.print();
});
$("#print_req").css("display","block");
return false;
});
This correctly hide that button, but when the printing process get done, the button won't show again! What is the problem?