<<< t04_yepnope.html ----------------------------------->>>
<html> <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <script type="text/javascript" src="js/yepnope.1.5.3-min.js"></script> <script type="text/javascript" src="t04_yepnope.js"></script> </head> <body> <div id="buttons" mydata="shinder"> <button id="b1"> Button 1 </button> <button> Button 2 </button> <button> Button 3 </button> </div> </body> </html>
<<< t04_yepnope.js ----------------------------------->>>
(function(){ var coffees_index = 0; var isDeveloping = true; var coffees = ['t03_yepnope2', 't03_yepnope1', 't03_yepnope3']; function runCoffees() { var num = new Date().getTime(); if( coffees[coffees_index] ) { if(isDeveloping) { CoffeeScript.load( coffees[coffees_index] + ".coffee?a" + num, runCoffees); } else CoffeeScript.load( coffees[coffees_index] + ".coffee", runCoffees); coffees_index ++; } } yepnope([ { load: "js/jquery-1.7.1.js" }, { load: "js/underscore-1.3.1.js" }, { test: !JSON, yep:"js/json2_min.js" }, { load: "js/backbone.js" }, { load: "js/coffee-script.js", complete: runCoffees } ]); })();
沒有留言:
張貼留言