Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #539996

    Right now I have a transparency of .7 on my header. What I want is it to turn solid white on scroll.

    Also if I turn off the sticky header the background turns to a solid gray. I can’t find where to adjust that. Just need to be able to do that if client wants to disable the sticky header.

    #541836

    Hey bensondesign!

    Please add following code to Functions.php file in Appearance > Editor

    
    function transparent_header_scroll(){
    ?>
    <script>
    jQuery(window).scroll(function(){
    if(jQuery(this).scrollTop() > 100) jQuery('#header').addClass('headerbgc');
    if(jQuery(this).scrollTop() < 100) jQuery('#header').removeClass('headerbgc');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'transparent_header_scroll');

    and then add following code to Quick CSS

    .headerbgc { background: white !important; }

    Cheers!
    Yigit

    • This reply was modified 9 years, 1 month ago by Yigit.
    #548373

    Yigit,
    That worked great. Thanks.

    #548389

    Hi!

    You are welcome!
    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Header transparency to solid on scroll’ is closed to new replies.