fixedunderrefactor
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user