Closed eillarra closed 11 years ago
I definitely agree that the drop-down menus are difficult with just plain CSS. We'll look into adding some sort of delay here in the near future. Thanks for reporting and for all the information! We love our community for keeping us on our toes and constantly helping improve the framework. If you have any ideas you've cooked up, feel free to submit a pull request and we'll check it out. Happy coding!
Personally, I'd like the drop-down menus to behave like the dropdown buttons do, i.e. they do not fly out until they are clicked. :)
It really drives me mad when things fly out at me when trying to navigate a website.
Perhaps this could be configurable and optional? I understand the reasoning behind the plain CSS philosophy. However ... :)
I do like the idea of making the top-bar clickable as an option. It's becoming a pretty common convention these days. We'll look into how we accomplish this. We'll need to add a bit of JS, but that shouldn't be a problem as far as I can see.
Fixed: https://github.com/zurb/foundation/commit/3659881e75afc990881535870173e6e9ceb3137c
Added data-topbar="hover"
configuration to enable hover states, click state by defualt.
Before I explain what's going on here, I recommend to read this article by Jacob Nielsen: http://www.nngroup.com/articles/mega-menus-work-well/
The important idea here is that if a user moves diagonally from the main item to the dropdown content, taking the pointer outside the active area (this happens), the dropdown should not disappear.
In the past, I have made some implementation of this using the jQuery hoverIntent plugin: http://cherne.net/brian/resources/jquery.hoverIntent.html but maybe you guys can think of something better.
From the article: