summaryrefslogtreecommitdiff
path: root/static/website/bootstrap-css/assets/js/main.js
blob: e59e192464990b178d64d8f37d08b18ed4d5cba5 (plain)
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
/*
 * Change Navbar color while scrolling
*/

$(window).scroll(function(){
	handleTopNavAnimation();
});

$(window).on("load",function (){
	handleTopNavAnimation();
});

function handleTopNavAnimation() {
	var top=$(window).scrollTop();
    if($('#home').attr("data") == 'home'){
	if(top>10){

		$('#site-nav').addClass('navbar-solid'); 
	}
	else{
		$('#site-nav').removeClass('navbar-solid'); 
	}
	}
	else{
    $('#site-nav').addClass('navbar-solid-other');
     $("a").removeAttr("data-scroll");
	}

}

/*
 * SmoothScroll
*/

smoothScroll.init();