Giter Club home page Giter Club logo

responsivemultilevelmenu's Introduction

ResponsiveMultiLevelMenu

A responsive multi-level menu that shows its submenus in their own context, allowing for a space-saving presentation and usage.

article on Codrops

demo

Licensed under the MIT License

responsivemultilevelmenu's People

Contributors

botelho avatar crnacura avatar gido avatar joeldbirch avatar rejas avatar valllabh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

responsivemultilevelmenu's Issues

conflict with modernizr

i have full package of modernizr not custom one. and i get this error on page load

Uncaught TypeError: Object # has no method 'prefixed'
jquery.dlmenu.js:57

Add options for custom selectors

It would be pretty helpful to have the ability to use custom selectors for navigation structure, like:

.some-cool-menu-trigger

instead of currently hardboiled:

.dl-trigger

Cheers

Set the menu open already on page responsive

I thought this would be simple but wondering of someone can help. I would like to have this menu be already open on the page load and still have the toggle close open class still working. I see how the class dl-active on the button and dl-menuopen on the ul thinking it was there or the config open true might be it but not the case. Appreciate any advice thanks.

Make trigger listen on a class rather than a button

In my case, i'd really prefer to open the menu using an anchor (I don't need a 'button' component, i just want a text representative)

If you make the trigger listen to a class, the listener is more re-usable.

eg:
this.$trigger = this.$el.children( 'button' );
becomes
this.$trigger = this.$el.children( '.dl-trigger' );

Option for "delay with hover" insted of CLICK

currently we use "CLICK" for menu nevigation, which is good and working fine.
But Nice if you provide hover with 3 sec. delay(mean after hover on any menu, it will give same current "click" functionality. if mouse stay for 3-4 sec on same place/menu link)
It just request.

Trigger menu from <button> outside of the Nav container

Using this in a Wordpress theme, and would like to pull the button out of the menu for the sake of layout control.

Currently cannot place the menu button around other elements in a webpage due to the menu covering up other elements. It would also be nice to use multiple instances for different menus such as "Cart/Shop" "MyAccount" and a full "Menu". Im not savvy with JS at all if anyone could update this script to support multiple instances. I believe someone posted a fix for this feature but it wasn't merged.

using multiple menu instances: add option to close menus which are already open

Suppose I want to use more than one menu instance on one page

Changing #dl-menu to a class one is a nobrainer, but menu's that are already open should be closed (or at least be an option)

I fixed this for now by adding a trigger:

...
_initEvents : function() {
    var self = this;
        this.$trigger.on( 'click.dlmenu', function() {
            if( self.open ) {
                self._closeMenu();
            } 
            else {
                /*addition*/
                if(!self.open && $('.dl-active')[0]) {
                    $('.dl-active').trigger('click');
                }
                /*end of addition*/
                self._openMenu();
...

Feature request: Make links that have children also navigable

Currently, a link that has children is assumed to be a dummy link that doesn't actually need to link to a page. Clicking it only shows its child items, and doesn't provide a way to actually navigate to that page.

CMSs such as Drupal build menus out of pieces of content and don't make heavy use of dummy links such as are expected by RMLM. To solve this, an option should be added to add a navigable link to an item at the top of its child link list.

use with angularjs ng-repeat

Hello,
How can use with angularjs for create menu ?
ng-repeat not create li list, i use this other but not ok with dl-menu
thanks for your help

third level menu not working in opencart 2.0.3.1

hi sir,
i am trying to implement third level menu in website but category.tpl is not working properly
plz help me in that
my email is [email protected]

the code is 👍

   - 0){ ?>
                    <ul> 
                           <?php foreach ($child['children_lv3'] as $child_lv3) { ?>
                           <li><a href="<?php echo $child_lv3['href']; ?>"><?php echo $child_lv3['name']; ?></a></li>
                            <?php  } ?>
                        </ul>
                    <?php } ?>

   -

Parent as link with Next Button

Has anyone had use for, or implemented a change to the menu where only the arrows advance the menu, but the links still work? I've got a menu that needs parents as links. So, basically, each item on the menu takes you to a page unless you click the button (which will advance to next level).

I know there is the: useActiveItemAsLink: true, config, but that still requires the user to click once more to get to that item and it's not very intuitive. Is there simple way to do: useParentItemAsLink: true ? By maybe appending a clickable arrow on each link that has children?

I'm just thinking about this right now, but I'm not entirely sure how to implement it:

        if (this.options.useParentItemAsLink) {
            this.$el.find( 'ul.dl-submenu li' ).append(function() {
                var parentlink = $(this).parents('li:not(.dl-back)').find('a');
                return '<span class="chevron-right"></span>';
            });
        }

I realize that would have to become the new trigger, but not exactly sure how to proceed. Any thoughts?

Thanks!

Visibility issues on android 2.2

When using on Android browser 2.2, when you click on a menu item it looks as if nothing happens, but the sub menu is loaded in you just cant see it.

Enhance open listener to allow 3rd party js click events as well.

Currently due to https://github.com/codrops/ResponsiveMultiLevelMenu/blob/master/js/jquery.dlmenu.js#L123 any 3rd party JS set to listen for clicks on those menu items for whatever reason never get triggered.

If you are going to call event.stopPropagation there then do it conditionally for the situations you deem it necessary, not on all clicks, which is not needed.

To clarify the situation, several WP themes use this library. When combined with a plugin like my own (Popup Maker) the user wants to be able to trigger a popup from the menu item, everything is set up correctly except that line prevents it from triggering the popup so it just sits there doing nothing.

Hope that is clear what we are hoping for.

Clicking on menu is not working on Chrome browser

Hello. I'm experiencing an issue on Chrome browser (v.80.0.3987.163). Unfortunately, I don't know from which version problem appeared maybe from v75-78... But the menu definitely was working on older versions of Chrome.
Uncaught TypeError: self.options.onLevelClick is not a function at jquery.dlmenu.js:152
jQuery version 1.8.3, jquery.dlmenu.js v1.0.1.
Any help?

IE9 problem - ghost clickable links stay when menu is closed

When viewing pages with dlmenu using IE9...
Problem appears in my project as well as on the demo pages for dlmenu.

Expected behaviour:
When menu is minimised (closed), normally the area where the menu expands is completely clear. Hit zones for the menu items are hidden. This can be seen in Firefox, Safari, etc.

IE9 behaviour:
When the menu is minimised (closed), a ghost area remains where the menu would normally expand to, when open. Menu content seems invisible, however the hit zones for menu items remain present and active.

These hit zones overlay the content of the page, including any links or other things in the content, which presents as a bug to users.

Can anything be done to avoid this issue in IE9?

'in' is a reserved word in JS

There are reserved words used in the code. These should be ascaped.

jshint breaks on this. IE8- breaks on this. ex:
animationClasses : { in : 'dl-animate-in-1', out : 'dl-animate-out-1' },
var $flyin = $submenu.clone().insertAfter( self.$menu ).addClass( self.options.animationClasses.in ),

Overflow bug with animation

I add

max-height: 400px;
overflow-y: auto;

to dl-submenu, because i have a very tall sub menu.

But it seems the animation ignore the height and overflow settings. The sub menu will show with full height and then change to 400px after the animation.

Unable to use with React components

When this plugin is used within a React component, onClick events do not fire. Here is the line of code causing this problem:

this.$menuitems.on( 'click.dlmenu', function( event ) {

                event.stopPropagation();

Source: https://github.com/codrops/ResponsiveMultiLevelMenu/blob/master/js/jquery.dlmenu.js#L123

I suggest that stopPropagation should only be called when a submenu parent node is clicked, but not when normal links are clicked, to improve compatibility with React and other frameworks.

Left / right switcher

Love the multilevelmenu. It normally opens with the menu displayed to the right and thats fine when you display the button on the left of a page. If you display the menu button on the right side of a webpage, the (sub)menu isn't shown entirely.

Would like to see a (simple) option to open the menu displayed to the left.
responsivemultilevelmenu-open-to-the-left

how to capture click event ?

Hi,

Thanks for the nice looking menu.
How do you capture the click event on a submenu item ?

I have tried : $(document).on('click', '.dl-menuwrapper li a:only-child'....
As my menus are dynamically generated but I don't capture a click.
I have seen in the js that there is the onLinkClick event, but I don't manage to capture it.

Help would be much appreciated.

[enhancement] Add missing bower.json.

Hey, maintainer(s) of codrops/ResponsiveMultiLevelMenu!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library codrops/ResponsiveMultiLevelMenu is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "codrops/ResponsiveMultiLevelMenu",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

Ability to change css color of sub menu

I was wondering if there was a way to change the color of the sub menu list that would be different from the main level menu. It appears that the css overlays the .dl-menuwrapper li a style on top of the submenu item so it all remains the same style. If anyone has any suggestions it would be appreciated!

Thanks so much!

Close Menu on Link Selection

Hi,

Are you able to either:

  • close the menu if the clicked element has an HREF (i.e. a link has been navigated), or
  • trigger an event to allow me to close the menu myself?

I would prefer the first option, but perhaps others would like the menu to remain open - maybe it is an option to be passed in init.

Ta

How can I make the parent link clickable?

Is there any way say I can go to the URL of the parent link item. You know, now when I click on a parent link, it will open the sub menu, so I cannot go to the URL of parent link.
I tried to add the parent link to its sub menu but when I click it, it still just open the sub menu.

Android 4.0 transition error

change
-webkit-animation: MenuAnimOut1 0.4s linear forwards;
to
-webkit-animation: MenuAnimOut1 0.4s;
and others
"linear forwards"
to
""
resolve the problem

Critical Error on Android 2.3

Great plugin, but unfortunately it crashes on Android 2.3 :(
I try debug this on Android via Weinre, but your JS code not throw any bug on console...

Keep the menu open

Hi..

Firstly a big up for creating something so helpful for so many users around the world.. I'm facing a slight problem.. I would like the menu to stay open at the current submenu-level when I click an item.

For eg. : When I goto Fashion / Men / Shirts and I click on Shirts.. I would like the menu to stay open at the item 'shirts' and let the user make the choice of going back instead of loading a new page with the menu closed.

Please help.

Cheers,
N.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.