Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1066306

    Bluelle
    Participant

    Hallo,
    first i have had the problem, that my individual menu in Sidebar do not collapse.
    I could manage it with this css code:
    .sub-menu {display: none;}
    .current_page_item .sub-menu, .current_page_parent .sub-menu {display: block;}

    and it works.

    But now the sub-menu from Main Navigation do not collapse when I’m click at some Item.

    How can I solve this problem.

    Thanks.

    #1066318

    Rupok
    Member

    Hi there,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1066365

    Bluelle
    Participant
    This reply has been marked as private.
    #1066451

    Lely
    Moderator

    Hi There,

    Thanks you for the URL.
    We need to adjust your current CSS to be specific for sidebar menu only. Please try this code instead:

    .x-sidebar .sub-menu {display: none;}
    .x-sidebar .current_page_item .sub-menu, .x-sidebar .current_page_parent .sub-menu {display: block;}

    If above code doesn’t work, please provide us the exact link where the sidebar menu is so we can take a closer look.

    Hope this helps.

    #1066483

    Bluelle
    Participant

    Hi,
    it works for the sublime, but now the sidebar menu does’t collapse.
    The side is:
    http://hausarztgemeinschaft-edersee.de/?page_id=546

    #1066600

    Paul R
    Moderator

    Hi,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – WordPress Login url
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1066727

    Bluelle
    Participant
    This reply has been marked as private.
    #1067295

    Nabeel A
    Moderator

    Hi there,

    Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript

    jQuery(document).ready(function($){
    	$('#x-section-1 li.menu-item-has-children').click(function(e){
    		e.preventDefault();
    		var a = jQuery(this);
    		var b = a.children('.sub-menu');
    		var submenu = b[0];
    		if(submenu.hidden == false) {
    			submenu.hidden = true;
    		}
    		else {
    			submenu.hidden = false;
    		}
    	});
    });

    Let us know how this goes!

    #1067521

    Bluelle
    Participant

    I have just tried . Unfortunately it does not work.

    #1067959

    Paul R
    Moderator

    Hi,

    You can try this code instead.

    
    
    jQuery(function($) {
        $('#menu-leistungen li a').on( "click touchstart", function() {
         $(this).next().toggle();
    });
    
    });
    

    It should go in Appearance > Customize > Custom > Edit Global Javascript

    Hope that helps

    #1067982

    Bluelle
    Participant

    First, thank you for your excellent support.
    I have fixed the code and now the submenu works well.
    Instead of this the sidebar menu called “Leistungen” does not collapse again 🙁

    #1067984

    Bluelle
    Participant

    Now it works, thank you very much..
    I have made a script error in custom css.

    Thanks

    #1067998

    Friech
    Moderator

    We’re delighted to assist you with this.

    Cheers!