1.0.0 • Published 5 years ago
jquery-printevents v1.0.0
jQuery Print Events
This plugin publishes jQuery events before and after print. It normalizes onbeforeprint/onafterprint and window.matchMedia using techniques described in this article.
Usage
Include dependencies:
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script>
<script src="jquery.printevents.js"></script>
Create subscribers for the published events:
$(document).on('print:before', function () {
// run code before print
});
$(document).on('print:after', function () {
// run code after print
});
1.0.0
5 years ago