Skip to content

Commit

Permalink
fix: navigation bar background at scroll position 0.
Browse files Browse the repository at this point in the history
navigation bar background blur property removed when page scroll value is 0.
  • Loading branch information
DeRoyace committed Nov 19, 2023
1 parent 9191be8 commit 6c72a27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ window.addEventListener('scroll', function () {
header.style.top = '-55px';
}
if(currentScrollPos == 0)
{
header.style.background = 'transparent';
header.style.backdropFilter = 'blur(0px)';
}
// update previous scroll position
prevScrollPos = currentScrollPos;
});
Expand Down Expand Up @@ -120,4 +123,4 @@ function product_img(product) {
else
img.style.backgroundImage = "url('https://cdn.shopify.com/s/files/1/0586/3270/0077/files/26Image_1280x1020_fc93e97b-7f99-4709-9253-8330d7d1c8ac_1292x.png?v=1658151723')";

}
}

0 comments on commit 6c72a27

Please sign in to comment.