-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
26 lines (23 loc) · 972 Bytes
/
script.js
File metadata and controls
26 lines (23 loc) · 972 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var current = 1; //keeps track of the current div
var height = $('.roles').height(); //the height of the roles div
var numberDivs = $('.roles').children().length; //the number of children of the roles div
var first = $('.roles div:nth-child(1)'); //the first div nested in roles div
setInterval(function() {
var number = current * -height;
first.css('margin-top', number + 'px');
if (current === numberDivs) {
first.css('margin-top', '0px');
current = 1;
} else current++;
}, 2000);
$(".stagger").fadeIn();
$( document ).ready(function() {
$(".stagger").show();
var numbersString = $(".stagger").text();
var numbersArray = numbersString.split(' ');
$(".stagger").html(" ");
$.each(numbersArray, function(index, value) {
$(".stagger").append('<span class="stagger--item">' + value + ' </span>');
});
TweenMax.staggerTo(".stagger--item", 1, {css:{color:"#D3D3D3"}, delay:0.5, force3D:true}, 0.125);
});