css
This commit is contained in:
parent
8c604d12c9
commit
79833e88a7
13 changed files with 455 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
window.onload = function () {
|
||||
includeHTML();
|
||||
headerShrink();
|
||||
headerToggle();
|
||||
};
|
||||
|
||||
window.onscroll = function () {
|
||||
|
|
@ -9,15 +9,12 @@ window.onscroll = function () {
|
|||
|
||||
|
||||
|
||||
function headerShrink() {
|
||||
function headerToggle() {
|
||||
const header = document.getElementById('site-header');
|
||||
const scrollPosition = window.scrollY || document.documentElement.scrollTop;
|
||||
|
||||
if (scrollPosition > 100) {
|
||||
header.classList.add('is-shrinked');
|
||||
} else {
|
||||
header.classList.remove('is-shrinked');
|
||||
}
|
||||
const buttonToggle = document.querySelector('menu-toggle');
|
||||
|
||||
console.log(buttonToggle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue