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.
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
Yigit,
That worked great. Thanks.
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