Tagged: x
-
AuthorPosts
-
May 10, 2016 at 5:04 am #983797
King JParticipantHey Guys,
I am trying to have my navigation start transparent at top of the page and then when one begins to scroll it turns non transparent. I tried many codes by searching this forum but nothing works. I am using the latest version of Integrity with visual composer. How do I achieve this effect?
Thanks in advance.
May 10, 2016 at 5:05 am #983798
King JParticipantThis reply has been marked as private.May 10, 2016 at 5:09 am #983801
King JParticipantIn addition, I am using revolution slider and the top portion behind the nav is solid. The pictures in revolution slider do not stretch to the top of the browser?
May 10, 2016 at 7:36 am #983983
ChristopherModeratorHi there,
Please add following code in Customize -> Custom -> JavaScript :
jQuery(document).ready(function($){ $('.x-navbar-fixed-top').addClass("transparent-navbar"); $(window).scroll(function(){ if ($(this).scrollTop() > 50) { $('.x-navbar-fixed-top').removeClass("transparent-navbar").addClass("white"); } else { $('.x-navbar-fixed-top').removeClass("white").addClass("transparent-navbar"); } }); });Please add following code in Customize -> Custom -> CSS :
@media (min-width:979px){ .x-navbar-fixed-top.transparent-navbar{ background-color:transaparent; } .x-navbar-fixed-top.white{ background-color:rgba(255,255,255,0.3); } .page-id-129 div#x-content-band-1 { margin-top: -60px !important; } }Hope it helps.
May 10, 2016 at 6:12 pm #984919
King JParticipantHey guys,
It worked in reverse. When the navbar is on top it should be transparent. When it starts to scroll it should be solid. With the code that you have given me, The navbar is solid on top and transparent when you scroll. Any other suggestions?
May 10, 2016 at 8:57 pm #985178
King JParticipantHey Guys,
I found a code that finally worked. The only problem is that it does not revert back to transparent when someone goes back to the top of the page. Any suggestions?
Thanks in advance..x-navbar {
background-color: transparent;
}.x-navbar.x-navbar-fixed-top {
background-color: #141414;
height: 60px;
}.x-navbar.x-navbar-fixed-top .x-brand {
width: 400px;
}.x-navbar.x-navbar-fixed-top .x-nav > li > a {
padding-top: 30px !important;
}May 11, 2016 at 1:32 am #985397
ChristopherModeratorHi there,
Please implement the code so we can see the issue you’re referring to.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-983797 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
