-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
48 lines (48 loc) · 1.22 KB
/
script.js
File metadata and controls
48 lines (48 loc) · 1.22 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
46
47
48
jQuery(document).ready(function($){
$.Scrollax();
});
// $(document).ready(function(){
// console.log('entered')
// $('#name').fadeIn(400);
// })
// Hide Header on on scroll down
// var didScroll;
// var lastScrollTop = 0;
// var delta = 10;
// var navbarHeight = $('header').outerHeight();
//
// $(window).scroll(function(event){
// didScroll = true;
// });
//
// setInterval(function() {
// if (didScroll) {
// hasScrolled();
// didScroll = false;
// }
// }, 400);
//
// function hasScrolled() {
// var st = $(this).scrollTop();
//
// // Make sure they scroll more than delta
// if(Math.abs(lastScrollTop - st) <= delta)
// return;
//
// // If they scrolled down and are past the navbar, add class .nav-up.
// // This is necessary so you never see what is "behind" the navbar.
// if (st > lastScrollTop && st > navbarHeight){
// // Scroll Down
// $('nav').removeAttr('id');
// $('nav').attr('id','nav-up');
// } else {
// // Scroll Up
// if(st + $(window).height() < $(document).height()) {
// $('nav').removeAttr('id');
// $('nav').attr('id','nav-down');
//
// }
// }
//
// lastScrollTop = st;
// }