Tagged: x
-
AuthorPosts
-
February 7, 2017 at 1:43 pm #1361662
eitanshavitParticipantHi,
My top nav is hidden, and I’m using only the main menu (fixed) with Ethos stack.
Currently menu background is black when on top and when I start scrolling.
I would like the menu BG to be transparent, and when I start scrolling, bg becomes black.
I think Icon stack has a similar behavior, but couldn’t find my way around the css files…Can you help?
Thanks,
Eitan
February 7, 2017 at 3:15 pm #1361757
RahulModeratorHi There,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
February 8, 2017 at 11:15 am #1363091
eitanshavitParticipantThis reply has been marked as private.February 8, 2017 at 3:24 pm #1363381
Nabeel AModeratorHi there,
Thank you for providing the credentials. Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $('.x-navbar-fixed-top, .x-navbar').css("background-color", "#000"); var navbar_height = $(".x-navbar").height(); $(window).scroll(function(){ if ($(this).scrollTop() > navbar_height) { $('.x-navbar, .x-navbar-fixed-top').attr('style','background-color: transparent !important'); } else { $('.x-navbar, .x-navbar-fixed-top').attr('style','background-color: #000 !important'); } }); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
February 8, 2017 at 3:36 pm #1363394
eitanshavitParticipantThanks!
Almost there 🙂
I wanted it to start transparent, and when scrolled down, it turns to black.Is this possible?
Tried to change the code, but it didn’t work….Thanks again.
February 8, 2017 at 4:14 pm #1363443
Nabeel AModeratorHi again,
Please replace the previous code with this:
jQuery(document).ready(function($){ $('.x-navbar-fixed-top, .x-navbar').css("background-color", "transparent"); var navbar_height = $(".x-navbar").height(); $(window).scroll(function(){ if ($(this).scrollTop() > navbar_height) { $('.x-navbar, .x-navbar-fixed-top').attr('style','background-color: #000 !important'); } else { $('.x-navbar, .x-navbar-fixed-top').attr('style','background-color: transparent !important'); } }); });Let us know how this goes!
February 8, 2017 at 11:48 pm #1363860
eitanshavitParticipantNo. Tried that.
It starts black, goes to transparent for a second and then back to black…February 9, 2017 at 1:08 am #1363937
Rue NelModeratorHello There,
Thanks for updating in! Do you want something like this, http://prntscr.com/e6ej19 ?
If that is the case, please edit your page in Cornerstone and insert the following custom css in the settings tab, Settings > Custom CSS
.x-navbar { margin-bottom: 0; border: none; } .page-id-6622.x-navbar-fixed-top-active .x-navbar-wrap { height: 0; }We would loved to know if this has work for you. Thank you.
February 9, 2017 at 10:43 am #1364501
eitanshavitParticipantYES!
Thank you!
I guess I’ll need to add this code to every page with its own page ID…
Unless there’s a global class to use.Thanks again,
Eitan
February 9, 2017 at 11:29 am #1364574
RahulModeratorGlad we were able to help you.
Feel free to ask us again.
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1361662 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
