function createDiv() { var i = 1; setTimeout(function() { var $newDiv = $('
').css({ "z-index": "-1000", "position": "fixed", "width": "150px", "height": "150px", "background-color": "#32466C", "border-radius": "720px" }); $($newDiv).each(function() { var animationArray = ["colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1", "colors1Rare", "colors1Rare", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors2", "colors3", "colors3", "colors3", "colors3", "colors3", "colors2", "colors3", "colors3", "colors3", "colors3", "colors3", "colors2", "colors3", "colors3", "colors3", "colors3", "colors3", "colors2", "colors3", "colors3", "colors3", "colors3", "colors3"]; var animationDurationChanceArray = ["10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "10s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "8s", "2s"]; var randDirectionArray = ["left", "up"]; var randDirectionAnimation = randDirectionArray[Math.floor(Math.random() * randDirectionArray.length)]; var randAnimationDuration = animationDurationChanceArray[Math.floor(Math.random() * animationDurationChanceArray.length)]; var randAnimation = animationArray[Math.floor(Math.random() * animationArray.length)]; var leftRandPos = Math.floor((Math.random() * window.innerWidth)); var topRandPos = Math.floor((Math.random() * window.innerHeight)); var rand2 = Math.floor((Math.random() * 15000) + 1000); var rand3 = Math.floor((Math.random() * 1500) + 1000); var rand4 = Math.floor((Math.random() * 20) + 10); $(this).css('left', leftRandPos); $(this).css('top', topRandPos); $('html').append($newDiv); if (rand2 < 1800) { $($newDiv).css({ "border-radius": "5px", "animation-name": randAnimation, "transform": "rotate(45deg)", "animation-duration": "5s" }); $($newDiv).hide("explode", { pieces: rand4 }, rand3); } else { $($newDiv).css({ "border-radius": "720px", "animation-name": randAnimation, "animation-duration": randAnimationDuration }); $($newDiv).slideUp(rand2); } $(".delete").click(function() { $($newDiv).css({ "animation-name": randDirectionAnimation, "animation-timing-function": "ease-out" }); $($newDiv).slideUp(rand2); }); $($newDiv).mouseover(function() { $($newDiv).css({ "animation-name": randDirectionAnimation, "animation-timing-function": "ease-out" }); }); }); i++; if (i < 1000000000) { createDiv(); } }, 120); } function blocks() { var blockCount = 10000; setInterval(function() { if (blockCount >= 0) { blockCount--; var block = $("").css({ "position": "fixed", "margin": "auto", "width": "100px", "height": "100px", "border-radius": "5px", "opacity": "0.5", "z-index": "-2000" }); $(block).each(function() { var hexArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f']; var rand1 = hexArray[Math.floor(Math.random() * hexArray.length)]; var rand2 = hexArray[Math.floor(Math.random() * hexArray.length)]; var rand3 = hexArray[Math.floor(Math.random() * hexArray.length)]; var rand4 = hexArray[Math.floor(Math.random() * hexArray.length)]; var rand5 = hexArray[Math.floor(Math.random() * hexArray.length)]; var rand6 = hexArray[Math.floor(Math.random() * hexArray.length)]; var array2 = [rand1, rand2, rand3, rand4, rand5, rand6]; var value = "#" + array2.join(""); $(this).css("background-color", value); $("html").append(block); var leftRandPos = Math.floor((Math.random() * window.innerWidth)); var topRandPos = Math.floor((Math.random() * window.innerHeight)); $(this).css('left', leftRandPos); $(this).css('top', topRandPos); var randAnimation = Math.floor((Math.random() * 4) + 1); if (randAnimation === 1) { $(block).animate({ left: "-=100px" }, 2000); } else if (randAnimation === 2) { $(block).animate({ top: "+=100px" }, 2000); } else if (randAnimation === 3) { $(block).animate({ left: "+=100px" }, 2000); } else if (randAnimation === 4) { $(block).animate({ top: "-=100px" }, 2000); } }); } }, 300); } /* $(document).ready(function() { $(".all, .close").click(function() { $(".alert").fadeToggle(1200); }); $(".dots").click(function() { var rand1 = Math.floor((Math.random() * 10) + 5); $("body").fadeOut(1200); $(".nav, .nav-container, .jumbotron, .col-sm-4, .col-sm-12, .table").hide("explode", { pieces: rand1 }, 1000); $("h1, h2, h3, a, td, th, li").css("font-size", "0px"); }); var i = 1; function createDiv() { setTimeout(function() { var randomColor = "#"+("123456"+ Math.floor(Math.random()*0x100000).toString(16)).substr(-6); $("html").css({'background-color': randomColor}); var $newStash = $('').css({ "z-index": "-1", "position": "absolute", "width": "32px", "height": "32px" }); $($newStash).css("background", "url(https://upload.wikimedia.org/wikipedia/commons/5/51/Farm-Fresh_mustache.png)"); var $newDew = $('').css({ "z-index": "-1", "position": "absolute", "width": "200px", "height": "144px" }); $($newDew).css("background", "url(//upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Mountain_Dew_logo.svg/200px-Mountain_Dew_logo.svg.png)"); var $newDoge = $('').css({ "z-index": "-1", "position": "absolute", "width": "300px", "height": "300px", "border-radius": "200px" }); $($newDoge).css("background", "url(https://c2.staticflickr.com/8/7375/14177453364_a3442dfa70.jpg)"); var $newText1 = $('