Tagged: x
-
AuthorPosts
-
April 11, 2016 at 11:55 am #876775
BradleyBParticipantHi,
I am redesigning our navbar and have a couple questions.
I am going to use the following code to create a transparent navbar which gets color upon scroll. I haven’t implemented the code yet because the site is live and I need to fix some issues:
body .x-navbar-wrap { height:auto; } body .x-navbar { background-color:transparent; border:0; box-shadow:none; } body .x-navbar-solid { background-color: rgba(0, 0, 0, 0.5); }jQuery(function($) { $(window).scroll(function(){ if($(window).scrollTop() >50) { $('.x-navbar').addClass("x-navbar-solid"); }else { $('.x-navbar').removeClass("x-navbar-solid"); } }); });Questions 1: Is there anyway to only apply the above code to certain pages? I have landing pages associated with my site which I do not want to apply this to.
Questions 2 Is there anyway to slow the transition from transparent to color? I would like it to gradually appear?
Thank you so much!!
April 11, 2016 at 11:58 am #876783
BradleyBParticipantThis reply has been marked as private.April 11, 2016 at 10:24 pm #877531
RupokMemberHi there,
Thanks for writing in!
#1. If you want to apply this to certain pages, then place the CSS/JS to page level Custom CSS/JS instead of Customizer. See – http://prntscr.com/ar6a1c
#2. You can try adding this code :
.x-navbar { transition: all 0.5s ease 0s; }Hope this helps.
Cheers!
April 12, 2016 at 11:09 am #878552
BradleyBParticipantamazing. Thank you so much!
April 12, 2016 at 8:57 pm #879210
John EzraMemberYou’re most welcome!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-876775 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
