FINI
This commit is contained in:
22
JS/bouton.js
Normal file
22
JS/bouton.js
Normal file
@@ -0,0 +1,22 @@
|
||||
let bouton;
|
||||
window.onload = function() {
|
||||
bouton = document.getElementById("haut");
|
||||
bouton.style.display = "none";
|
||||
}
|
||||
|
||||
window.onscroll= function() {descente()};
|
||||
|
||||
function descente(){
|
||||
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
|
||||
bouton.style.display = "block";
|
||||
}
|
||||
else {
|
||||
bouton.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function EnHaut(){
|
||||
document.body.scrollTop = 0;
|
||||
document.documentElement.scrollTop = 0;
|
||||
bouton.style.display = "none";
|
||||
}
|
8
JS/burger.js
Normal file
8
JS/burger.js
Normal file
@@ -0,0 +1,8 @@
|
||||
function myFunction() {
|
||||
var x = document.getElementById("myTopnav");
|
||||
if (x.className === "topnav") {
|
||||
x.className += " responsive";
|
||||
} else {
|
||||
x.className = "topnav";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user