mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Global: Fix up button
Due to the fact that "document.body.scrollTop" was removed from newer browsers, hovering over this button was not displayed. I replaced this with "window.scrollY" which works in newer browsers. I also localized the text on it.
This commit is contained in:
parent
4c841c96a6
commit
d87277e7e7
4 changed files with 5 additions and 3 deletions
|
@ -93,7 +93,7 @@
|
|||
<div class="dimmer"></div>
|
||||
|
||||
<div class="toTop">
|
||||
⬆ Вверх
|
||||
⬆ {_to_top}
|
||||
</div>
|
||||
|
||||
<div class="layout">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
window.addEventListener("scroll", function(e) {
|
||||
if(document.body.scrollTop < 100) {
|
||||
if(window.scrollY < 100) {
|
||||
document.body.classList.toggle("scrolled", false);
|
||||
} else {
|
||||
document.body.classList.toggle("scrolled", true);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
"home" = "Home";
|
||||
"welcome" = "Welcome";
|
||||
"to_top" = "To top";
|
||||
|
||||
/* Login */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
"home" = "Главная";
|
||||
"welcome" = "Добро пожаловать";
|
||||
"to_top" = "Вверх";
|
||||
|
||||
/* Login */
|
||||
|
||||
|
|
Loading…
Reference in a new issue