Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1244864
    JAshwell
    Participant
    This reply has been marked as private.
    #1244865
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Please use this code instead:

    jQuery(document).ready(function($) {
      $(window).scroll(function() {
        var scrollPos = $(window).scrollTop(),
            navbar = $('.x-navbar-fixed-top');
        if (scrollPos > 500) {
          navbar.addClass('alt-color');
        } else {
          navbar.removeClass('alt-color');
        }
      });
      
      /*jQuery(document).querySelector( "#nav-toggle" ).addEventListener( "click", function() {
        this.classList.toggle( "active" );
      });*/
    });
    
    jQuery(function($){
      
      $(window).scroll(function(){
        if( $(this).scrollTop() == 0 ) {
          $('.x-navbar-fixed-top').removeClass('x-navbar-fixed-top');
        }
      });
    
      $( ".x-btn-navbar" ).on( "touchstart click", function() {
         $('.x-navbar').toggleClass('navbar-solid');
      });
    });
    
    (function($){
      $('#nav-toggle').on('touchend click', function(){
        $('.x-btn-navbar').toggleClass('active');
      });
      
      $('.x-navbar .x-nav-wrap.mobile a').on('touchend click', function(){
        //$('.x-nav-wrap.mobile').toggleClass('in').css('height', 0);
        //$('.x-btn-navbar').toggleClass('collapsed');
        //$('.x-btn-navbar').toggleClass('active');
        $('.x-btn-navbar').trigger('click');
      });
    })(jQuery);

    Hope this helps.

    #1244905
    JAshwell
    Participant

    Right, we’re getting close!! It almost works perfectly. The issue is now because of the old mobile menu button i think. So when i select the new nav toggle span element everything works fine, however, when you select the old nav button (which is transparent), it confuses the whole navigation, and it then displays in the wrong state.

    Really appreciate the help thus far, thanks for the effort!

    #1245045
    JAshwell
    Participant
    This reply has been marked as private.
    #1245351
    Rad
    Moderator

    Hi there,

    Looks like a glitch on mobile rendering. I checked and deleted the mobile toggle and still there. It appears once click but disappears instantly, and I can’t find which is doing that since that effect doesn’t exist from the CSS. It’s weird since our theme has no styling or feature like that.

    Is it okay if you setup a clone of your site (staging) but with no customization? I just like to compare the two and find what causes it.

    Thanks!

    #1245352
    JAshwell
    Participant
    This reply has been marked as private.
    #1245671
    Christopher
    Moderator

    Hi there,

    Please use duplicator plugin https://wordpress.org/plugins/duplicator/ to clone your website.

    thanks.

    #1245703
    JAshwell
    Participant
    This reply has been marked as private.
    #1245859
    JAshwell
    Participant
    This reply has been marked as private.
    #1246200
    Rad
    Moderator

    Hi there,

    It’s not related to primary navbar templates. Unfortunately, I still have no clue what’s causing the glitch, as if it’s like another element other than the mobile button. And I can’t replicate it on any installation. If you can’t create a duplicate of your site, then please backup your site, then allow me to do some major changes on your site. Please provide your FTP login credentials as well. Let me know 🙂

    Thanks!

    #1247109
    JAshwell
    Participant
    This reply has been marked as private.
    #1249895
    JAshwell
    Participant
    This reply has been marked as private.
    #1250622
    Rad
    Moderator

    Hi there,

    No clue yet, the FTP is incorrect too as I can’t get it. But I did some experiment to remove the inner spacing. Please try this

    .x-btn-navbar {
        margin: 0.458em 0.625em !important;
        padding: 0px !important;
    }

    Cheers!

    #1250674
    JAshwell
    Participant
    This reply has been marked as private.
    #1250676
    JAshwell
    Participant
    This reply has been marked as private.
  • <script> jQuery(function($){ $("#no-reply-1242814 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>