fixedunderrefactor
This commit is contained in:
@@ -11,6 +11,12 @@
|
|||||||
visibility: hidden !important;
|
visibility: hidden !important;
|
||||||
transition: none !important; /* No transition on first load */
|
transition: none !important; /* No transition on first load */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ensure header is transparent sitewide when not sticky */
|
||||||
|
.header-hide-until-scroll:not(.sticky-container-active) {
|
||||||
|
background-color: transparent !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<link crossorigin data-rocket-preconnect href="https://fonts.googleapis.com" rel="preconnect">
|
<link crossorigin data-rocket-preconnect href="https://fonts.googleapis.com" rel="preconnect">
|
||||||
<link crossorigin data-rocket-preconnect href="https://8ded8880.delivery.rocketcdn.me" rel="preconnect">
|
<link crossorigin data-rocket-preconnect href="https://8ded8880.delivery.rocketcdn.me" rel="preconnect">
|
||||||
|
|||||||
@@ -591,4 +591,24 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
19
index.php
19
index.php
@@ -525,24 +525,7 @@
|
|||||||
<script>
|
<script>
|
||||||
(function($) {
|
(function($) {
|
||||||
$(window).on('load', function() {
|
$(window).on('load', function() {
|
||||||
// Header scroll visibility
|
// Apply shrink to sections after hero (Homepage specific)
|
||||||
const $header = $('.header-hide-until-scroll');
|
|
||||||
|
|
||||||
// Show header once the page has fully loaded to avoid the initial flicker
|
|
||||||
// but keep it visible even in the landing section.
|
|
||||||
$header.addClass('header-visible-scrolled');
|
|
||||||
|
|
||||||
$(window).scroll(function() {
|
|
||||||
const scrollTop = $(this).scrollTop();
|
|
||||||
|
|
||||||
// Keep it visible throughout, but we can add logic if we want
|
|
||||||
// a specific effect. Since the user wants it visible in landing too:
|
|
||||||
if (scrollTop >= 0) {
|
|
||||||
$header.addClass('header-visible-scrolled');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Apply shrink to sections after hero
|
|
||||||
$('.elementor-61 > .e-parent').not(':first').addClass('section-shrink');
|
$('.elementor-61 > .e-parent').not(':first').addClass('section-shrink');
|
||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|||||||
Reference in New Issue
Block a user