-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (30 loc) · 873 Bytes
/
index.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
$(document).ready(function(){
$("a").on('click', function(event) {
if (this.hash !== "") {
event.preventDefault();
var hash = this.hash;
$('body,html').animate({
scrollTop: $(hash).offset().top
}, 1200, function(){
window.location.hash = hash;
});
}
});
});
var width = $(window).width();
window.onscroll = function(){
if ((width >= 900)){
if(document.body.scrollTop > 80 || document.documentElement.scrollTop > 80) {
$("#middle").css("background-size","150% auto");
}else{
$("#middle").css("background-size","100% auto");
}
}
};
setTimeout(function(){
$("#loading").addClass("animated fadeOut");
setTimeout(function(){
$("#loading").removeClass("animated fadeOut");
$("#loading").css("display","none");
},800);
},1450);