It looks quite nice actually so I’ll consider adding it! But let’s leave this thread open if someone comes up with a neat solution or tip for a plugin.
I’ve been searching a lot and apparently there is no such plugin.
https://www.secretcompass.com has a great solution.
Hi Webbjocke,
I hired someone to solve this issue through javascript and css.
Here’s the javascript:
(function($){
$(document).ready(function(){
$(window).on('scroll', function(){
var heighttop = $(window).scrollTop();
if(heighttop > 1){
$("#site-header").addClass("scroll-bg");
$('.scroll-bg li.current-menu-item a').attr('style', 'color:#FFF !important');
}else{
$("#site-header").removeClass("scroll-bg");
$('.scroll-bg li.current-menu-item a').removeAttr('style');
}
});
});
})(jQuery);
And here’s the CSS:
.scroll-bg{
background:#FFF !important;
transition:.6s all;
}
#site-header {
transition: .8s all;
}
.site-nav a, .site-title, #site-slogan {
text-transform: uppercase;
}
.scroll-bg .site-nav a, .scroll-bg .site-title, .scroll-bg .site-slogan, .scroll-bg #site-slogan {
color:#000 !important;
}
.scroll-bg .site-nav a:hover{
color:#FFF !important;
}
.scroll-bg #mobile-menu-btn a {
color: #000;
}
@media screen and (max-width: 991px) {
.scroll-bg .menu li a{
color:#FFF !important;
}
}
You can see how it works here: https://goo.gl/kO2cB5
Any feedback you might have would love to hear it.
-
This reply was modified 9 years, 1 month ago by
Alex T..
-
This reply was modified 9 years, 1 month ago by
Alex T..
It looks nice I think! Should also be future safe and won’t break when new updates comes, if you add it via a child theme or plugin.
It was added via plugin. So safe from theme updates. It’s working well so far.
Please feel free to use it in future versions of Satisfy. Just my way of saying thank you for your help in this forum – although I realize it’s not a big deal deal writing this little bit of code. For someone like me who doesn’t know any javascript it made a lot of difference.
Great! Maybe I just might 😉