forked from code-differently/RR-JS-HTML-Resume
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
16 lines (15 loc) · 703 Bytes
/
script.js
File metadata and controls
16 lines (15 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
document.addEventListener('scroll', (event)=>{
var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
if(scrollTop> 700){
console.log('hello');
const socialBanner = document.querySelector('.banner__splash__social');
console.log({socialBanner})
socialBanner.classList.add('banner__splash__social--fixed')
}
if(scrollTop < 800){
console.log('hello');
const socialBanner = document.querySelector('.banner__splash__social');
console.log({socialBanner})
socialBanner.classList.remove('banner__splash__social--fixed')
}
})