-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
23 lines (18 loc) · 995 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"use strict";
// $(window).on("load", function() {
// $("#countdown").countdown($("#countdown").attr("data-time"), function(e) {
// $(this).html(e.strftime("<div>%D<span>Days</span></div> <div>%H<span>Hours</span></div> <div>%M<span>Minutes</span></div> <div>%S<span>Seconds</span></div>"))
// });
// });
function animateWithRandomNumber(myClass, from, to) {
TweenMax.fromTo(myClass, Math.floor(Math.random() * (60 - 2 + 1) + 2) * 0.5 + 0.5, { y: from }, { y: to,
onComplete: animateWithRandomNumber,
onCompleteParams: [myClass, from, to],
ease: Linear.easeNone });
}
var itemsDown = [".light4", ".light5", ".light6", ".light7", ".light8", ".light11", ".light12", ".light13", ".light14", ".light15", ".light16"].forEach(function (e) {
return animateWithRandomNumber(e, -1080, 1080);
});
var itemsUp = [".light1", ".light2", ".light3", ".light9", ".light10", ".light17"].forEach(function (e) {
return animateWithRandomNumber(e, 1080, -1080);
});