I am trying to print just the contents of a colorbox
$(".print-invoice").on("click", function(event){
window.print();
return false;
});
This prints the whole page, the file path is popups/info.html
I am trying to print just the contents of a colorbox
$(".print-invoice").on("click", function(event){
window.print();
return false;
});
This prints the whole page, the file path is popups/info.html
You can try this:
$(".print-invoice").click(function() {
$('#the_Iframe_ID')[0].print();
});
Its a few months late, but for the benefit of anyone else who may come across this:
If you use an iframe to display the content, then a print button in that content will only print whats in the colorbox. To use an iframe, set the iframe
setting to true:
$(document).ready(function(){
$(".linktocolorbox").colorbox({iframe:true});
});
Here is my solution on inner HTML with multiple divs with same class