Menu icon Foundation

My Posts

  • 4
    Replies
  • Hide parent menu with dropdown

    By Lethunder

    dropdownmenu

    Hello everyone, I have a transparent dropdown menu.what happens is that when i open submenu user can see parent menu.so i want to hide previous parent menu and display it back when user click on "back" link.how ever i'm not able actually to handle click ... (continued)

    Last Reply by Rafi Benkual over 3 years ago


My Comments

Lethunder commented on Lethunder's post over 3 years

 This is what i'm talking about
http://codepen.io/anon/pen/WxbQRJ

Lethunder commented on Lethunder's post over 3 years

Hello Rafi,
sorry for late answer :)
what i want to do it's quite simple. on my drilldown menu, i would like when i click on a link to hide the parent menu when displaying submenu. This is very important when you display you menu and submenu with transparent background. Otherwise, when the submenu displays, you'll see behind parent menu.
This is what i did but it's not working all the time
 
    $(".is-drilldown-submenu-parent > a").click(function (e) {
 
        var ul = $(this).closest("ul");
        var lis = ul.children('li');
        lis.each(function () {
                $("ul.left_menu_wrapper > li > a").hide();
        });
    });
 
    $(".js-drilldown-back > a").click(function (e) {
        var ul = $(this).closest("ul").parent("li").closest("ul");
        var lis = ul.children('li');
        lis.each(function () {
            $(this).children("a").show();
        });
    });

Lethunder commented on Ricky's post over 3 years

Hello guys, i have the same problem.i'm trying to handle on click event on dropdown menu with submenu but no way.Ricky solution doesn't work for me.any idea please?

Posts Followed


Following

    No Content

Followers

My Posts


My Comments

You commented on Lethunder's post over 3 years

 This is what i'm talking about
http://codepen.io/anon/pen/WxbQRJ

You commented on Lethunder's post over 3 years

Hello Rafi,
sorry for late answer :)
what i want to do it's quite simple. on my drilldown menu, i would like when i click on a link to hide the parent menu when displaying submenu. This is very important when you display you menu and submenu with transparent background. Otherwise, when the submenu displays, you'll see behind parent menu.
This is what i did but it's not working all the time
 
    $(".is-drilldown-submenu-parent > a").click(function (e) {
 
        var ul = $(this).closest("ul");
        var lis = ul.children('li');
        lis.each(function () {
                $("ul.left_menu_wrapper > li > a").hide();
        });
    });
 
    $(".js-drilldown-back > a").click(function (e) {
        var ul = $(this).closest("ul").parent("li").closest("ul");
        var lis = ul.children('li');
        lis.each(function () {
            $(this).children("a").show();
        });
    });

You commented on Ricky's post over 3 years

Hello guys, i have the same problem.i'm trying to handle on click event on dropdown menu with submenu but no way.Ricky solution doesn't work for me.any idea please?

Posts Followed


Following

  • No Content

Followers

  • No Content