Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1220598
    ahurlburt53
    Participant

    I want a collapsible menu for widget area custom menus http://647.aaf.myftpupload.com/. When a web viewer clicks on main menu titles the sub menus appear

    screen shot
    http://i.imgur.com/95QCYBU.png

    for example I use this code for the first custom menu item
    http://i.imgur.com/bSd6DFt.png

    #1220642
    Paul R
    Moderator

    Hi,

    Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!

    #1220645
    ahurlburt53
    Participant

    You got to be kidding me

    #1220686
    Paul R
    Moderator

    Hi,

    To achieve this, you can add the code below in Custom > Edit Global CSS in the customizer

    
    .x-sidebar.left .widget_nav_menu .sub-menu {
       display:none;
    }
    

    Then add this in Custom > Edit Global Javascript in the customizer

    
    jQuery(function($) {
        $('.x-sidebar.left .widget_nav_menu li.menu-item-has-children a').on( "click", function() {
      $(this).next().slideToggle(400);
    });
    });
    
    

    Hope that helps.

    #1220688
    ahurlburt53
    Participant

    If I can buy you lunch, TYTY

    #1220710
    Joao
    Moderator

    I am glad we managed to help,

    Joao

    #1220733
    ahurlburt53
    Participant

    TY Joao

    #1220747
    ahurlburt53
    Participant

    Hi Joao. Is there anyway to prevent submenu from closing automatically when clicked on?

    http://i.imgur.com/sErwror.png

    #1220825
    Paul R
    Moderator

    Hi,

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

    
    .x-sidebar.left .widget_nav_menu .current-menu-parent .sub-menu {
        display:block !important;
    }
    

    Hope that helps.

    #1221111
    ahurlburt53
    Participant

    TYTYTy. Looking good

    #1221137
    Rahul
    Moderator

    Glad to hear it!

    Let us know if you need any further assistance. We’d be happy to help!

    Thank you.

    #1221209
    ahurlburt53
    Participant

    Just spoke to the client he does not like the fact when he clicks on the left menu. The website reloads to the top of page. Very difficult to navigate. For example click on first trust in the left menu. Please make the position of menu stay in the same area as click position

    screen shot http://i.imgur.com/TA8HHUY.png
    http://i.imgur.com/i5mlANH.png

    also client wants to remove the header completely and white line
    http://i.imgur.com/zpUOVtb.png

    #1221834
    Lely
    Moderator

    Hi There,

    Please try to update this:

    jQuery(function($) {
        $('.x-sidebar.left .widget_nav_menu li.menu-item-has-children a').on( "click", function() {
      $(this).next().slideToggle(400);
    });
    });

    To this:

    jQuery(function($) {
        $('.x-sidebar.left .widget_nav_menu li.menu-item-has-children a').on( "click", function(e) {
        e.preventDefault();
      $(this).next().slideToggle(400);
    
    });
    });

    Hope this helps.

    #1222104
    ahurlburt53
    Participant

    I update the code. now when link is clicked nothing happens? TY very much for all your help

    #1222355
    Lely
    Moderator

    Hi There,

    Try to update this:

    jQuery(function($) {
        $('.x-sidebar.left .widget_nav_menu li.menu-item-has-children > a').on( "click", function(e) {
        e.preventDefault();
      $(this).next().slideToggle(400);
    
    });
    });

    We have filtered the code to work on links with children only.
    Do let us know how this goes.

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