I'm using printThis by Jason day and on its config page it shows that you can trigger the plugin using:
$('selector').printThis();
Now when I do that I have noticed that this trigger is showing print box on Page load instead of clicking on a button.
How do I use this plugin and trigger it on a button instead of a default page load?
So in order to do that you need to add some listener for the
clickevent of your button.Assume this is your HTML:
And this is your javascript code: