QRCODE - DYNAMIC - BIZAMAJIG USAGE

by bizamajig

HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>JQM Scroll test</title>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.min.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script type="text/javascript">
       $(document).bind("mobileinit", function(){
          //apply overrides here
        
        });         
    </script>        
    <script type="text/javascript" src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
    <script type="text/javascript" src="http://jeromeetienne.github.com/jquery-qrcode/src/jquery.qrcode.js"></script>
<script type="text/javascript" src="http://jeromeetienne.github.com/jquery-qrcode/src/qrcode.js"></script>
</head>
    <body>
        <div id="page" data-role="page">
            <div data-role="header" data-position="fixed"><h1>Header</h1>
     </div>
            <div data-role="content">
                <button class="qr">http://www.jquerymobile.com</button>
                <button class="qr">I LOVE JQM</button>
                <div id="qrcodeCanvas"></div>
            </div>
            <div data-role="footer" data-position="fixed"><h1>Footer</h1></div>
        </div>
    </body>
</html>

JavaScript

$('.qr').live('click',function(){ 
    $('#qrcodeCanvas').html('').qrcode({
        text    : $(this).text()
    });
});