Skip to content

Commit

Permalink
changed fold calc
Browse files Browse the repository at this point in the history
  • Loading branch information
gardenboi committed Nov 8, 2023
1 parent a2de13e commit e07f811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/modules/scrollControl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function scrollCallback() {
}
}

if ( Ypos >= ( document.body.scrollHeight - window.innerHeight ) / 2 ) {
if ( Ypos >= window.innerHeight ) {
document.body.classList.remove( 'above-the-fold' );
} else {
document.body.classList.add( 'above-the-fold' );
Expand Down

0 comments on commit e07f811

Please sign in to comment.