lassyQR is a very simple jQuery plugin that makes it easy to create QR Codes (Two-dimensional Barcode) from different kinds of data on your website or application.

How to use it:

1. Load the latest version of jQuery library from google CDN

1
https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
2. Load the jQuery ClassyQR after jQuery library

1
http://js/jquery.classyqr.js
3. Create a container to embed the QR Code

1

2

4. Call the plugin with options

view source
1

2
$(document).ready(function() {
3
$(‘#qr’).ClassyQR({
4
create: true, // signals the library to create the image tag inside the container div.
5
type: ‘text’, // text/url/sms/email/call/locatithe text to encode in the QR. on/wifi/contact, default is TEXT
6
text: ‘Welcome to jQueryScript!’ // the text to encode in the QR.
7
});
8
});
9

Advertisements