Tagged: x
-
AuthorPosts
-
October 11, 2016 at 3:51 pm #1212036
KB-WFWParticipantHi X-theme suport.
I an looking to have a background color (actually a transparency) that is different than the rest of the navigation on desktop. But since this is a one page navigation, i can’t seem to affect the active item I.e. the one I clicked on instead of all of the navigation items
Right now it’s just a blank slate : http://cbi.worryfreeweb.ca/
But what I am trying to achieve is as in the attached file.. I am not worried about the background image for now, I just need to see if this is possible.
1. Hover changes transparency hue
2. Active changes transparency huethanks in advance.
Craig
October 11, 2016 at 11:40 pm #1212489
RupokMemberHi Craig,
It’s tough to understand what you are looking for based on your screenshot because it’s too low res. Can you provide the example site you are trying to mimic?
Thanks!
October 12, 2016 at 7:02 am #1212827
KB-WFWParticipantHi Rupok,
Sorry it’s not clear. Basically I need to have a transparency over the navbar background image that changes when you hover or is in the active link.. Since it’s a one page set up I thin the active link will be all the menu items at once ??
See attached. Hope it helps
October 12, 2016 at 7:49 am #1212869
KB-WFWParticipanthere, try this one.
October 12, 2016 at 12:16 pm #1213258
Nabeel AModeratorHi again,
Please add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:
.x-navbar .desktop .x-nav > li > a:hover, .x-navbar .desktop .x-nav > .x-active > a, .x-navbar .desktop .x-nav > .current-menu-item > a, .x-navbar .desktop .sub-menu a:hover, .x-navbar .desktop .sub-menu .x-active > a, .x-navbar .desktop .sub-menu .current-menu-item > a, .x-navbar .desktop .x-nav .x-megamenu > .sub-menu > li > a, .x-navbar .mobile .x-nav li > a:hover, .x-navbar .mobile .x-nav .x-active > a, .x-navbar .mobile .x-nav .current-menu-item > a { color: hsl(0,0%,80%); background: rgba(10, 28, 243, 0.48); }And then add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $('.x-nav li').each(function(){ $(this).removeClass('current-menu-item'); }); $('.x-nav li').click(function(){ $('.x-nav li').each(function(){ $(this).removeClass('current-menu-item'); }); $(this).addClass('current-menu-item'); }); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
October 12, 2016 at 1:29 pm #1213368
KB-WFWParticipantThis is great.. I’ll try once I have the background image and play with colors .
Appreciate the quick guidance.
X theme rocks (AND so do the support team) !!
October 12, 2016 at 3:32 pm #1213543
NicoModeratorLet us know how it goes
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1212036 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
