-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
29 lines (28 loc) · 910 Bytes
/
main.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
$(document).ready(function() {
$('.menu-toggler').on('click', function() {
$(this).toggleClass('open');
$('.top-nav').toggleClass('open');
$('.bar.half').toggleClass('open');
});
$('.top-nav').on('click', function() {
$('.menu-toggler').removeClass('open');
$('.bar.half').removeClass('open');
$('.top-nav').toggleClass('open');
});
$('nav a[href*="#"]').on('click', function() {
$('html, body').animate(keyframes = {
scrollTop: $($(this).attr('href')).offset().top - 100
}, options = 2000);
$('.bar.half').removeClass('open');
// $('.menu-toggler').removeClass('open');
});
$('#up').on('click', function() {
$('html, body').animate(keyframes = {
scrollTop: 0
}, options = 2000);
});
AOS.init({
easing: 'ease',
duration: 1800
});
});