<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function() { function init() { var $targetSection = $('section[data-section-id="67472f49ffa1ba4b6e64aab5"]'); var $body = $('body'); var $header = $('header'); if (!$targetSection.length || !$body.length || !$header.length) { setTimeout(init, 100); return; } var observer = new IntersectionObserver(function(entries) { entries.forEach(function(entry) { if (!entry.isIntersecting) { $body.addClass('scroll-past'); } else { $body.removeClass('scroll-past'); } }); }, { threshold: 0, rootMargin: '-10% 0px 0px 0px' }); observer.observe($targetSection[0]); } init(); }); </script> <style> body.scroll-past header#header img { opacity: 1 !important; } </style>