-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
49 lines (44 loc) · 969 Bytes
/
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
$(document).ready(function () {
/* For the sticky navigation */
$(".js--section-features").waypoint(
function (direction) {
if (direction == "down") {
$("nav").addClass("sticky");
} else {
$("nav").removeClass("sticky");
}
},
{
offset: "60px;",
}
);
/* Scroll on buttons */
$(".js--scroll-to-plans").click(function () {
$("html, body").animate(
{ scrollTop: $(".js--section-projects").offset().top },
350
);
});
/* Animations on scroll */
$(".js--wp-1").waypoint(
function (direction) {
$(".js--wp-1").addClass("animated fadeIn");
},
{
offset: "50%",
}
);
$(".js--wp-2").waypoint(
function (direction) {
$(".js--wp-2").addClass("animated fadeIn");
},
{
offset: "50%",
}
);
/* Mobile navigation */
$(".js--nav-icon").click(function () {
var nav = $(".js--main-nav");
nav.slideToggle(200);
});
});