Tagged: x
-
AuthorPosts
-
May 30, 2016 at 3:17 pm #1016971
charlescthomsonParticipantHi Support!
Couldn’t seem to find an answer to this question in the forums.
I`d like to have the font in my main nav menu change colour as I scroll. Any help would be appreciated!http://www.cefoodexperience.ca
Thanks!
May 30, 2016 at 3:35 pm #1016985
JoaoModeratorHi There,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / passwordDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
You also could provide us instead if you prefer the JS and CSS codes you are using at the moment to achieve the scrolling effect.
Thanks,
Joao
May 30, 2016 at 3:43 pm #1016997
charlescthomsonParticipantThis reply has been marked as private.May 30, 2016 at 5:34 pm #1017097
JadeModeratorHi Charles,
Please update your JS code to:
jQuery(document).ready(function($){ $('.home .x-navbar-fixed-top').css("background-color", "transparent"); $(window).scroll(function(){ if ($(this).scrollTop() > 400) { $('.home .x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.99)").css("transition","0.3s ease-in-out "); } else if ($(this).scrollTop() > 300) { $('.home .x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.75)").css("transition","0.3s ease-in-out "); } else if ($(this).scrollTop() > 200) { $('.home .x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.5)").css("transition","0.3s ease-in-out "); } else if ($(this).scrollTop() > 100) { $('.home .x-navbar-fixed-top').css("background-color", "rgba(255,255,255,0.35)").css("transition","0.3s ease-in-out "); } else { $('.home .x-navbar-fixed-top').css("background-color", "transparent").css("transition","0.3s ease-in-out "); } if ($(this).scrollTop() > 100) { $('.home .x-navbar-fixed-top').addClass('x-navbar-scrolled'); } else { $('.home .x-navbar-fixed-top').removeClass('x-navbar-scrolled'); } }); });Then add this CSS in the customizer:
.x-navbar-scrolled .desktop .x-nav > li > a > span { color: #272727; }Hope this helps.
May 30, 2016 at 7:54 pm #1017278
charlescthomsonParticipantUnfortunately, that did not work!
Any other ideas?
Cheers,
May 30, 2016 at 11:59 pm #1017525
RupokMemberHi there,
I can’t see the suggested code on your site so not sure if you really added this or took it off. Would you keep the code and update us?
Cheers!
May 31, 2016 at 1:08 pm #1018580
charlescthomsonParticipantSorry about that!
I seem to have gotten it to work by using the code you provided. Works like a charm!
However, it removes the nav link hover colour once scrolled. Is there a quick solution to that?Cheers!
May 31, 2016 at 1:11 pm #1018590
charlescthomsonParticipantFrom above:
Sorry about that!
I seem to have gotten it to work by using the code you provided. Works like a charm!
However, it removes the nav link hover colour once scrolled. Is there a quick solution to that?Cheers!
—————-
I’ve also noticed that the transparent scroll to white and the nav link colours only work on the home page.
Could you please suggest how I correct that?Thank you kindly!
May 31, 2016 at 1:54 pm #1018653
JoaoModeratorHi There,
Please keep all the code as you have now and add the following code to your Customizer / Custom / CSS
.x-navbar-scrolled .desktop .x-nav > li > a > span:hover { color: red; }Hope that helps,
Joao
May 31, 2016 at 2:39 pm #1018703
charlescthomsonParticipantThanks!
May 31, 2016 at 3:07 pm #1018750
JoaoModeratorYou are welcome.
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1016971 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
