Creating A QR Code Containing A URL with jQuery - qrcode
File Size: | Unknown |
---|---|
Views Total: | 27579 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
Qrcode is a tiny jQuery plugin that generates a QR code containing a custom URL, by using qrcdn.com's jQuery API.
How to use it:
1. Load the latest version of jQuery library and jQuery qrcode plugin in the page.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" src="jquery.qrcode.js"></script>
2. Create a container where you want to place the QR code.
<div id="demo"></div>
3. Generate a QR code containing custom data.
<script type="text/javascript"> $(document).ready(function() { $('#test').qrcode({ 'url' : 'https://www.jqueryscript.net', // users will be redirected to this URL when scanning the QR-Code 'width' : 300, // image width in pixel 'height' : 300, // image height in pixel 'qrsize' : 100 // quality of the QR-Code in pixel }); }); </script>
This awesome jQuery plugin is developed by grizzly. For more Advanced Usages, please check the demo page or visit the official website.