forked from yoonseo7/yoonseo7.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
30 lines (27 loc) · 793 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
$(document).ready(function () {
$("a").on('click', function (event) {
var hash = this.hash;
$('body,html').animate({
scrollTop: $(hash).offset().top
}, 0, 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);