javascript - Using HTML5 canvas tutorial. Menu not working. Jquery plugin -
for reason code drawing portion of html5 canvas tutorial working quite fine. can't menu show up.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script type="text/javascript" src="sketch.js"></script> </head> <body> <div class="tools"> <a href="#colors_sketch" data-download="png" style="float: right; width: 100px;">download</a> </div> <canvas id="simple_sketch" width="1200" height="800"></canvas> <script type="text/javascript"> $(function() { $('#simple_sketch').sketch(); }); $(function() { $.each(['#f00', '#ff0', '#0f0', '#0ff', '#00f', '#f0f', '#000', '#fff'], function() { $('#colors_demo .tools').append("<a href='#colors_sketch' data-color='" + + "' style='width: 10px; background: " + + ";'></a> "); }); $.each([3, 5, 10, 15], function() { $('#colors_demo .tools').append("<a href='#colors_sketch' data-size='" + + "' style='background: #ccc'>" + + "</a> "); }); $('#colors_sketch').sketch(); }); </script>
Comments
Post a Comment