|
|
| (18 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) |
| Zeile 1: |
Zeile 1: |
| <!--{if isset($qrcode)}--> | | <!--{if isset($qrcode)}--> |
|
| |
|
| <div>
| |
| <script type="text/javascript" src="/qrcode/jquery.js"></script>
| |
| <script type="text/javascript" src="/qrcode/jquery.qrcode.min.js"></script>
| |
| <div id="qrcode"></div>
| |
| <script type="text/javascript">
| |
|
| |
|
| /*
| |
| https://api.jquery.com/jquery.noconflict/
| |
|
| |
| If for some reason two versions of jQuery are loaded (which is not recommended),
| |
| calling $.noConflict(true) from the second version will return the globally
| |
| scoped jQuery variables to those of the first version.
| |
| Some times it could be issue with older version (or not stable) of JQuery files.
| |
|
| |
| Solution: move new jQuery completely in new object and use this.
| |
| */
| |
|
| |
| var my = {};
| |
| my.jquery = jQuery.noConflict( true );
| |
|
| |
| my.url = "<!--{$url|escape:'html'}-->";
| |
|
| |
| my.jquery('#qrcode').qrcode("this plugin is great");
| |
| //make qrcode clickable
| |
| my.jquery('#qrcode').click(function() {
| |
| alert( my.url );
| |
| })
| |
|
| |
| </script>
| |
| </div>
| |
|
| |
|
| <!--{else}--> | | <!--{else}--> |