]> _ Git - c6-wordpress.git/commitdiff
wait #7119 @0:40
authorsoufiane <soufiane@cubedesigners.com>
Mon, 7 Oct 2024 15:55:15 +0000 (17:55 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 7 Oct 2024 15:55:15 +0000 (17:55 +0200)
wp-content/mu-plugins/cube/src/Elementor/Widgets/HeroBlock.php

index 16209a88fcd20c48faefba190097504bf3a89062..3174ed38fe31ac4af14dcf2a661ab31c3f20834b 100644 (file)
@@ -244,6 +244,25 @@ class HeroBlock extends Widget_Base {
                $(document).on("click", ".hero-block-player-button", function() {
                    $('#player-video .elementor-custom-embed-image-overlay').click()
                })
+
+                const homeBanner = $("#home-banner");
+               if(homeBanner.length > 0) {
+                   const bottomHomeBanner = homeBanner.get(0).getBoundingClientRect().bottom
+
+                   $(window).on("scroll", function (e) {
+                       if ($(window).scrollTop() + 150 > bottomHomeBanner) {
+                           $('header.site .inner').css({
+                               "background": "#fff",
+                               "color": "#1c1c1c"
+                           })
+                       } else {
+                           $('header.site .inner').css({
+                               "background": "transparent",
+                               "color": "#fff"
+                           })
+                       }
+                   })
+               }
             })(jQuery)
         </script>