Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG, <img /> support, options.border parameter, code optimization + utf8 from someone on github #56

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jquery.qrcode.js
# jquery-qrcode

<a href='http://jeromeetienne.github.com/jquery-qrcode'>jquery.qrcode.js</a>
is *jquery plugin for a pure browser qrcode generation*.
Expand All @@ -15,7 +15,7 @@ Show, dont tell, here is a <a href='https://github.com/jeromeetienne/jquery-qrco

Let me walk you thru it. First include it in your webpage with the usual script tag

<script type="text/javascript" src="jquery.qrcode.min.js"></script>
<script type="text/javascript" src="jquery.qrcode.js"></script>

Then create a DOM element which gonna contains the generated qrcode image. Lets say
a div
Expand All @@ -24,13 +24,13 @@ a div

Then you add the *qrcode* in this container by

jquery('#qrcode').qrcode("this plugin is great");
$('#qrcode').qrcode("this plugin is great");

This is it. see it <a href='examples/basic.html'>live</a>.

You can set the height and width of the generated qrcode:

jquery('#qrcode').qrcode({width: 64,height: 64,text: "size doesn't matter"});
$('#qrcode').qrcode({width: 64, height: 64, text: "size doesn't matter"});


## Conclusion
Expand Down
23 changes: 17 additions & 6 deletions examples/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,36 @@
<title>basic example</title>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<!--<script type="text/javascript" src="../jquery.qrcode.min.js"></script>
--><script type="text/javascript" src="../src/jquery.qrcode.js"></script>
<script type="text/javascript" src="../src/qrcode.js"></script>
<script src="../src/jquery.qrcode.js"></script>
<script src="../src/qrcode.js"></script>

<p>Render in table</p>
<div id="qrcodeTable"></div>
<p>Render in canvas</p>
<div id="qrcodeCanvas"></div>
<p>Render in SVG</p>
<div id="qrcodeSVG"></div>
<p>Render in image</p>
<div id="qrcodeImage"></div>
<script>
//jQuery('#qrcode').qrcode("this plugin is great");
jQuery('#qrcodeTable').qrcode({
render : "table",
text : "http://jetienne.com"
});
});
jQuery('#qrcodeCanvas').qrcode({
render : "canvas",
text : "http://jetienne.com"
});
});
jQuery('#qrcodeSVG').qrcode({
text : "http://jetienne.com"
});
jQuery('#qrcodeImage').qrcode({
render : "image",
text : "http://jetienne.com"
});
</script>

</body>
Expand Down
28 changes: 0 additions & 28 deletions jquery.qrcode.min.js

This file was deleted.

Loading