Streaming live at 10am (PST)

Close Dropdown Menu after link is clicked


#1

simple workaround to close dropdown element on click.

mylinkclass = ".mynavlink";
mywdropdownelement = "#mydropdown";

if($(mylinkclass).closest('.w-dropdown-link')) {
        var gg = $(mywdropdownelement);
        $.each(gg[0], function(key, element) {
            if (key.substring(0, 6) == "jQuery") {
              gg[0][key][".w-dropdown"].leave();
              return false;
            }
        });
}

#2

Do you have a question? If you are posting code, please also provide a demo site/page.


#3

This topic was automatically closed after 60 days. New replies are no longer allowed.