mirror of
https://github.com/openvk/openvk
synced 2024-11-14 19:19:14 +03:00
14 lines
343 B
JavaScript
14 lines
343 B
JavaScript
|
window.addEventListener("scroll", function(e) {
|
||
|
if(document.body.scrollTop < 100) {
|
||
|
document.body.classList.toggle("scrolled", false);
|
||
|
} else {
|
||
|
document.body.classList.toggle("scrolled", true);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
u(".toTop").on("click", function(e) {
|
||
|
window.scrollTo({
|
||
|
top: 0,
|
||
|
behavior: "smooth"
|
||
|
});
|
||
|
});
|