Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #1123963

    Hello everyone,
    how do i get this resolved that only a submenu is open and not all. I’m going too deep.

    MFG Basti


    Hey Qeibu,

    I’m not sure I understand your question, could you post a link to where we can see it and try to explain a bit further please?

    Best regards,


    Hello Rikard, i create the new Site first offline. My Question to the Burger Menu is. You klick the first menu link and the Sub open. Then you klick on the second link and this sub is open. I need when i klick on second or after then links all other menu links with his submenu‘s are close. I would like to have only one link incl. Submenu open


    i do not have this to examine if it will work but can you try this in child-theme functions.php:

    hm – not working – looking for touchfriendly code


    just one moment – on touch devices this must be adjusted …
    … hm could not find the clue. on avia.js there is that function toggle_submenu( menu, e )
    but i do not see how to close the siblings on touch.
    Maybe a mod knows better way to do it. – Sorry


    Hello Guenni007,
    thx for Support i have build a fix :-)

    jQuery(document).ready(function( $ ){
    $(‘body’).on( ‘click touch’, ‘.av-active-burger-items a’, function () {
    $(this).parent(‘li’).siblings().find(‘ul’).slideUp( “fast”, function() {


    Hi Qeibu,

    Great, I’m glad that you managed to come up with a solution and thanks for sharing. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,


    hm – does not work on my end here !
    (maybe it is because of my webers-testseite and its child-theme functions.php with over 2000 lines of additional test snippets. But i guess there is something missing.
    Can you please post the whole thing you have done. The code f.e. in your child-theme functions.php.

    Or are you looking only for a solution of first-level menu ( with submenu ) closing? – Then your code is enough for it.
    i’m trying to close a second-level by clicking its siblings. This is often the case if you are having a mega menu with column headings and sub-menu under it.

    so there must be additional code .
    the “siblings-structure” is on sub-menu a bit different – maybe this will work:

    function only_one_submenu_open(){
    (function($) {
    	$('body').on( 'click touch', '.av-width-submenu > a', function () {
    		$(this).parent('li').siblings().find('ul').slideUp( "fast");
    add_action('wp_footer', 'only_one_submenu_open');
    • This reply was modified 9 months, 4 weeks ago by  Guenni007.
    • This reply was modified 9 months, 4 weeks ago by  Guenni007.

    sometimes ( it depends on the multi-level menu structure it became necessary to have an addon on that:

    	$('body').on( 'click touch', '.av-width-submenu > a', function () {
    		$(this).parent('li').siblings().find('ul').slideUp( "fast");

    the li’s on some circumstances are not direct siblings


    Hello Guenni007,
    i don‘t use the functions.php. I use a snippet plugin is better for Overview. I see you have a ohter situation.

    You have li.tutorials > ul.submenu > li > ul.submenu > li

    I have li.fahrzeuge > ul.submenu > li

    You must be adress the deeper submenu li seperate.

    LG Basti


    Hi Basti,

    Thanks for the update and thanks to @guenni007 for helping out.

    Best regards,


    YES! @guenni007 THANK YOU A MILLION!

    This was the perfect solution, and the only one on the internet.

    Many thanks!


    Hi MrPoBoi,

    Great, I’m glad that you found @guenni007‘s solution. I’ll go ahead and close this thread since a solution has been provided.

    Best regards,

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘[avia_hamburger_menu] Only one open toggle allowed (accordion mode)’ is closed to new replies.