Update css/main.css, js/main.js
Deleted main.css, main.js
This commit is contained in:
parent
0e30b0ce96
commit
4b70c28030
4 changed files with 25 additions and 24 deletions
16
js/main.js
16
js/main.js
|
|
@ -0,0 +1,16 @@
|
|||
// Show button on scroll
|
||||
window.onscroll = function() { toggle_gototop() };
|
||||
|
||||
function toggle_gototop() {
|
||||
gototop_button = document.getElementById("gototop");
|
||||
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
|
||||
gototop_button.style.display = "block";
|
||||
} else {
|
||||
gototop_button.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function gototop() {
|
||||
document.body.scrollTop = 0; // For Safari
|
||||
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
|
||||
}
|
||||
Loading…
Reference in a new issue