mirror of https://github.com/4xmen/xshop.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
304 B
JavaScript
9 lines
304 B
JavaScript
5 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')
|
||
|
}
|
||
|
});
|