-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
68 lines (50 loc) · 1.5 KB
/
script.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* MEET WRF */
$('.meet-wrf-link').click(function() {
$('.meet-wrf').removeClass('meet-wrf--hidden');
$('.meet-wrf').addClass('meet-wrf--show');
});
$('.meet-wrf-close').click(function() {
$('.meet-wrf').removeClass('meet-wrf--show');
$('.meet-wrf').addClass('meet-wrf--hidden');
});
/* WORK WRF */
$('.work-wrf-link').click(function() {
$('.work-wrf').removeClass('work-wrf--hidden');
$('.work-wrf').addClass('work-wrf--show');
});
$('.work-wrf-close').click(function() {
$('.work-wrf').removeClass('work-wrf--show');
$('.work-wrf').addClass('work-wrf--hidden');
});
/* CONTACT WRF */
$('.contact-wrf-link').click(function() {
$('.contact-wrf').removeClass('contact-wrf--hidden');
$('.contact-wrf').addClass('contact-wrf--show');
});
$('.contact-wrf-close').click(function() {
$('.contact-wrf').removeClass('contact-wrf--show');
$('.contact-wrf').addClass('contact-wrf--hidden');
});
/* NAVBAR SHRINK */
function init() {
window.addEventListener('scroll', function(e) {
var distanceY = window.pageYOffset || document.documentElement.scrollTop,
shrinkOn = 100,
header = document.querySelector('header');
if (distanceY > shrinkOn) {
classie.add(header, 'smaller');
} else {
if (classie.has(header, 'smaller')) {
classie.remove(header, 'smaller');
}
}
});
}
window.onload = init();
/* CAROUSEL */
$('#wrfCarousel').carousel({
interval: false
})
$('#wrfAbout').carousel({
interval: false
})