forked from postphotos/stormy
/
chaser.js
32 lines (28 loc) · 860 Bytes
/
chaser.js
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
27
28
29
30
31
32
$(document).foundation('reveal', {animation: 'fade', animationspeed: 200});
function revealOne() {
$('#slides-1').foundation('reveal', 'open');
createSlidesOne();
}
function revealBio(bioname) {
$('.top-bar, [data-topbar]').css('height', '').removeClass('expanded');
$(bioname).foundation('reveal', 'open');
}
var derp1 = function(){ $('div.opener').bind('inview', function(event, visible) {
if (visible) {
$(this).stop().animate({ opacity: 1}, 1500);
}
if (!visible) {
$('#name1').animate({opacity: 0}, 450);
$('#name2').animate({opacity: 1}, 450);
} else {
$('#name1').stop().animate({opacity: 1}, 150);
$('#name2').stop().animate({opacity: 0}, 150);
}
})};
derp1();
var derp2 = function(){ $('#footer-bar').bind('inview', function(event, visible) {
if (visible) {
$('.nextwrap').stop().animate({ opacity: 1}, 500);
}
})};
derp2();