Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var derp = prompt("Choose the length of the sides, which is in the set 2^n!");
- buildBlocks(derp, delayAlert());
- });
- function buildBlocks(derp, callback) {
- setTimeout(function() {
- var complete;
- for (var i = 0; i < derp; i++) {
- $("#main").append("<div class='row text-center' id='row" + i + "'>");
- for (var j = 0; j < derp; j++) {
- $("#row" + i).append("<div class='block'></div>");
- }
- $("#main").append("</div>");
- if (typeof callback == 'function')
- callback();
- }
- }, 10);
- };
- function delayAlert() {
- setTimeout('alert("Click to on a block to create a hole in the grid!");', 100);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement