I'm trying to print a table but it captures the whole page and in mobile mode, I would like to just print the addr-table class as below:
HTML
<table class="addr-table">
... table content...
</table>
<a href="#" class="js-print-link">Print</a>
JS
<script>
$('.js-print-link').on('click', function() {
var printBlock = $(this).parents('.addr-table').siblings('.addr-table');
printBlock.hide();
window.print();
printBlock.show();
});
</script>
I tried many formats including suggestions on SO, this code performed the best, now the last huddle. How can I capture just the table in normal pc mode not mobile mode