adgsm / multi-level-push-menu

MultiLevelPushMenu jQuery Plugin implementation
http://multi-level-push-menu.dzunic.net
804 stars 213 forks source link

startMode value? #59

Open robertliuling opened 10 years ago

robertliuling commented 10 years ago

Hi,

2 things:

First: I tried to use this plug in as our navigation menus, which means i need to hide it when initial page load, and allowing a button to show the menu.

However I couldn't find the possible values for this variable anywhere in the code. Can someone kindly provide some help?

Second: I'm trying to integrate bootstrap3 and multi level menu, however, the code seems trying to add extra margins to the pushing container, which results the width of the fluid container to be broken.

Thanks,

adgsm commented 10 years ago
  1. I'm not sure to understand the question. There is an example of expanding/collapsing menu on external button click here #25 (http://jsfiddle.net/L3LrK/). Is tis what you're looking for?
  2. If I remember well both margins (left and right) are being calculated for pushed containers so width should remain intact.
robertliuling commented 10 years ago

Thanks for the hint.

This is fixed now thanks for the fiddle script, I need to set the width of the push container to 100%, so the width is fine now. The toggle part helps too.

robertliuling commented 10 years ago
  1. now i'm just wondering is it possible the make the menu scrollable so that i'm able to view more menu options, cause current setting is fixed height, which means not-scrollable.
  2. is any quick way to set the menu show right away, instead of doing animation? cause when i click on the button to hide the menu, the menu hide slowly to the left and the background stays until the menu hides completely.

Thanks,

adgsm commented 10 years ago
  1. please look at what @josemadriz requested in issue #19 discussion. this is yet to be developed...
  2. isn't collapsed: false work for you?
corradomatt commented 10 years ago

With regard to @robertliuling point 1 - I think I might have a solution. It's probably not the best option but seems to work ok in my testing....

Let's say your top level menu is #menu. You can add the following to your css to allow scrolling on menus that are longer than the rest of the page length.

div#menu,
div#menu * {
    overflow-y: scroll;
}

Caveat: All menus will be scrollable since we are targeting everything in the menu. So even if you have a short menu that doesn't need to scroll, it will scroll as much as the longest menu needs it to scroll. While this can be problematic from a UX standpoint, it's a small price to pay until we come up with something better - IMO. (if someone has already solved this, please submit a PR already!)

corradomatt commented 10 years ago

oops...never mind. Here's a better solution - http://jsfiddle.net/graycarper/W6nrX/16/

taken from another issue - https://github.com/adgsm/multi-level-push-menu/issues/49#issuecomment-36699745

adgsm commented 9 years ago

or using iscroll; take a look at #107