fix
This commit is contained in:
parent
9a32245946
commit
836a6db9d2
1 changed files with 2 additions and 6 deletions
|
@ -8,18 +8,14 @@ document.getElementsByTagName('body')[0].onscroll = () => {
|
|||
// var navbar = document.getElementById("navbar");
|
||||
|
||||
if (bottomBar != null) {
|
||||
if (currentScrollPos <= 60) {
|
||||
if (currentScrollPos <= 60 || (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 100)) {
|
||||
bottomBar.style.transform = "translateY(60px)";
|
||||
console.log('test 2')
|
||||
}
|
||||
else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 100)) {
|
||||
else if (prevScrollpos > currentScrollPos) {
|
||||
bottomBar.style.transform = "translateY(0px)"
|
||||
console.log('test 1')
|
||||
}
|
||||
else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 100)) {
|
||||
bottomBar.style.transform = "translateY(60px)"
|
||||
console.log('test 3')
|
||||
}
|
||||
else {
|
||||
bottomBar.style.transform = "translateY(60px)"
|
||||
console.log('test 4')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue