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