Skip to content

Instantly share code, notes, and snippets.

@dudesl
Last active August 29, 2015 14:08
Show Gist options
  • Save dudesl/6a3b9f27645d38dd6c53 to your computer and use it in GitHub Desktop.
Save dudesl/6a3b9f27645d38dd6c53 to your computer and use it in GitHub Desktop.
Print de un elemento específico
$('#print').on("click", function () {
printVoucher()
});
function printVoucher(){
var instructionVoucher = document.getElementById("paperTicketInstructions");
var print = window;
print.document.write(instructionVoucher.innerHTML);
// print.document.close();
// print.focus();
print.print();
// print.close();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment