Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1383120
    Eric
    Participant

    Hi Guys,

    I somehow messed with the JS that controls the navbar background color. Its transparent, then color appears when you scroll down, but goes transparent again when you scroll all the way back to the top. Its not going back to transparent when you are back at the top. site: https://simplelogicweb.com

    Here is the JS I am using: What am I doing wrong?

    jQuery(document).ready(function($){
    $(‘.x-navbar-fixed-top, .x-navbar’).css(“background-color”, “transparent”);
    var rev_height = $(“.x-slider-container”).height();
    $(window).scroll(function(){
    if ($(this).scrollTop() > rev_height) {
    $(‘.x-navbar, .x-navbar-fixed-top’).attr(‘style’,’background-color: #333 !important’);
    } else {
    $(‘.x-navbar, .x-navbar-fixed-top’).attr(‘style’,’background-color: background-color: transparent !important’);
    }
    });
    });

    #1383159
    Eric
    Participant

    Nevermind. Fixed it!

    #1383260
    Nabeel A
    Moderator

    Glad you’ve fixed it.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1383120 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>