Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1270251
    axirr
    Participant

    Hello X-Force,

    Great work per usual. I love X-Theme!

    Scenario: I have a left-fixed Navbar that collapses down to a top-fixed navbar on mobile. On mobile, you click on any of the links in the submenu and it loads a new page, no biggie…

    However, it also reloads the top-fixed navbar each time.

    Is it possible to

    a) have the navbar not reload with each menu click or page navigation, and stay active at the top….

    b) have the top-fixed navbar collapse after someone clicks a menu item to laod a new page?

    Thanks for any assistance!

    #1270252
    axirr
    Participant
    This reply has been marked as private.
    #1270286
    Paul R
    Moderator

    Hi,

    Thanks for writing in!

    a. This is a normal behaviour as for every click your site is loading another page.

    b. You can add this under Custom > Edit Global Javascript in the Customizer.

    
    jQuery(function($) {
    $( ".x-navbar .mobile .x-nav li a" ).on( "click", function() {
         $('.x-btn-navbar').click();
    });
    });
    

    Hope that helps.

    #1271276
    axirr
    Participant

    Thanks for the reply on B.

    For A, my navbar IS refreshing upon every page clicked and I would like it not to.

    #1271280
    Rue Nel
    Moderator

    Hello There,

    Tha navbar is part of the header of each pages. Every time you load a page, the header will also be included. Regretfully, your particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #1271431
    axirr
    Participant

    Understandable. Thank you hmfor the help and clarifying! Much appreciated!

    #1271460
    axirr
    Participant

    See link for profile page: http://www.scottnicklos.com/profile/

    Click on the Navbar and the three submenu items under “Profile.”

    They anchor to certain spots on the page, but clicking them does not collapse the navbar. How can i modify what was provided above so those will collapse on clicking as well?

    Thanks!

    #1271671
    Rad
    Moderator

    Hi there,

    Please change the above code to this

    jQuery(function($) {
    $( ".x-navbar .mobile .sub-menu li a" ).off('click touchend touchstart').on( "click", function() {
         $('.x-btn-navbar').click();
    });
    });
    

    Thanks!

    #1271826
    axirr
    Participant

    Thank you!

    #1271880
    Rue Nel
    Moderator

    You’re welcome! We’re happy to help you out.
    If you need anything else we can help you with, don’t hesitate to open another thread.

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