forked from imfunniee/fimbo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
42 lines (38 loc) · 1.02 KB
/
index.js
File metadata and controls
42 lines (38 loc) · 1.02 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
$(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);
function DoDownload(url) {
const a = document.createElement('a')
a.href = url
a.download = url.split('/').pop()
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
}