flexnav icon indicating copy to clipboard operation
flexnav copied to clipboard

Menu opens only when clicking the triangle - UI feature request

Open aatosmedia opened this issue 11 years ago • 4 comments

Based on our usability tests, we noticed that quite many users tried to open the menu by clicking the menu-text.

Is it possible that menu would open also by tapping the menu bar?

aatosmedia avatar Feb 10 '14 08:02 aatosmedia

@aatosmedia I had the same issue, simply add a break point data attribute to your UL as it shows in the documentation.

cdevroe avatar May 06 '14 14:05 cdevroe

@cdevroe Thanks! I already have

    . What I am supposed to achive with this? I checked the flexnav home page and there the menu text also opened the menu. Bit confused :)

aatosmedia avatar May 06 '14 15:05 aatosmedia

Hi, i have the same problem, it is possible to open the sub-menus by clicking the menu-text? i have add the break point data attribute, but i can't click the menu-text. Have you yet a solution for this?

thanks and kind regards

DrWeizen avatar Feb 26 '15 15:02 DrWeizen

so, this is how I sort of got it working: This is a Drupal site, so the selectors are the top level menus that I want to click to expand to open the menus.

        $('.menu-mlid-2414 > a, .menu-mlid-2430 > a, .menu-mlid-2438 > a, .menu-mlid-2440 > a', context).on( 'click', function(e){
          e.preventDefault();
          var subMenus = $(this).parents('.flexnav').find('.sub_menu');
          subMenus.each( function() {
            if (!$(this).hasClass('open')) {
              $(this).removeClass('flexnav-show');
              $(this).siblings('.touch-button').removeClass('active');              

            }
            else {
              $(this).siblings('.touch-button').addClass('active');
              $(this).addClass('flexnav-show');

            }
          });
    });

The menu opens just fine, but it seems my code fires sometimes before the "open" class is applied. Randomly, it seems. This will cause the touch_button to continue pointing down instead of up when the menu is clicked, again randomly. Sometimes it works just fine. I am going to try adding a .5s delay.

scottsawyer avatar Jun 15 '15 13:06 scottsawyer