fixedunderrefactor

This commit is contained in:
Kishore Kumar C
2026-05-07 18:37:51 +05:30
parent 687d0547a0
commit a4f9a2e89a
3 changed files with 28 additions and 19 deletions

View File

@@ -591,4 +591,24 @@
</div>
</div>
</header>
</header>
<script>
(function($) {
$(function() {
// Header scroll visibility logic - Globalized
const $header = $('.header-hide-until-scroll');
// Show header once the page has started to load to avoid flicker
// but maintain the hide-until-scroll behavior if needed
$header.addClass('header-visible-scrolled');
$(window).on('scroll', function() {
const scrollTop = $(this).scrollTop();
// Maintain visibility after scroll
if (scrollTop >= 0) {
$header.addClass('header-visible-scrolled');
}
});
});
})(jQuery);
</script>