Home > coding, common, printQr > jQuery.printQr: use QR-Codes for your Print-Stylesheet with Google Charts API and jQuery

jQuery.printQr: use QR-Codes for your Print-Stylesheet with Google Charts API and jQuery

18. März 2011 moldi

It’s a common practice to make the URIs of links visible in a print styleheets via CSS:

@media print {
a:after {
content: " (" attr(href) ")";
}
}

Quite often you would not like to type a cryptic url by hand. Here is what you may utilize jQuery.printQr for.

Here is all you have to do:

<script src="jquery.printqr.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
    $('a').printQr();
});
</script>

These lines of code will add QR Codes for all links to the bottom of the page when you print it.
I built a little demo page.

Have fun with it, I’m interested in some feedback.

Kategoriencoding, common, printQr Tags:
Kommentare sind geschlossen
mmm