mirror of https://github.com/4xmen/xshop.git
9 lines
304 B
JavaScript
9 lines
304 B
JavaScript
6 months ago
|
const scrollBreakpoint = window.innerHeight * 0.2;
|
||
|
window.addEventListener('scroll',function () {
|
||
|
if (window.scrollY > scrollBreakpoint){
|
||
|
document.querySelector('#SimpleGoTop').classList.add('show')
|
||
|
}else{
|
||
|
document.querySelector('#SimpleGoTop').classList.remove('show')
|
||
|
}
|
||
|
});
|