I would like to add a Bootstrap button to invoke the printing of content on a page, I got this example, but it works from a link, see: Example
The code places the link at the top of the page, I also saw an example here, on that Stackoverflow Example link, but I do not like to open the page with content again, simply click the button, call the print box and print as in the first example cited.
The code for the first example is this:
$(document).ready(function() { $('#container').prepend('Click aqui para imprimir'); $('a#print').click(function() { window.print(); return false; }); });