|
|
| 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" width="<!--{$size|escape:'html'}-->"></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.query = jQuery.noConflict( true );
| |
|
| |
| // use new way to call function when DOM is ready. old way was $(document).ready(handler)
| |
| my.query(function() {
| |
|
| |
| var url ="<!--{$url|escape:'html'}-->";
| |
|
| |
| my.query('#qrcode').qrcode(url);
| |
|
| |
| //make qrcode clickable
| |
| // my.query('#qrcode').click(function() {
| |
| // alert( url );
| |
| // });
| |
|
| |
| // alert( url );
| |
| });
| |
|
| |
|
| |
|
| |
| </script>
| |
| </div>
| |
|
| |
|
| <!--{else}--> | | <!--{else}--> |