Print Button in Jquery
Copy Below Code
View As A Text File
Show Text Only
Show API
Edit Code
jQuery(document).ready(function($){
$('.btn-primary').click(function(){
var contaners = $(this).closest('li').html();
var str = '<button class="btn btn-primary">Print</button>';
var contaner= contaners.replace(str, ' ');
var divToPrint = document.getElementById('report');
var popupWin = window.open('', 'width=300,height=300');
popupWin.document.open();
popupWin.document.write('<html><body onload="window.print()">' + contaner + '</html>');
popupWin.document.close();
});
});