-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.js
More file actions
45 lines (36 loc) · 1.21 KB
/
Copy pathmain.js
File metadata and controls
45 lines (36 loc) · 1.21 KB
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
$(document).ready(function(){
//------------------------------------//
//Navbar//
//------------------------------------//
var menu = $('.navbar');
$(window).bind('scroll', function(e){
if($(window).scrollTop() > 140){
if(!menu.hasClass('open')){
menu.addClass('open');
}
}else{
if(menu.hasClass('open')){
menu.removeClass('open');
}
}
});
//------------------------------------//
//Scroll To//
//------------------------------------//
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top}, 800);
});
//------------------------------------//
//Wow Animation//
//------------------------------------//
wow = new WOW(
{
boxClass: 'wow', // animated element css class (default is wow)
animateClass: 'animated', // animation css class (default is animated)
offset: 0, // distance to the element when triggering the animation (default is 0)
mobile: false // trigger animations on mobile devices (true is default)
}
);
wow.init();
});