Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Multiple menus #28

Open
planetcrypton opened this issue Jan 24, 2013 · 3 comments
Open

Multiple menus #28

planetcrypton opened this issue Jan 24, 2013 · 3 comments

Comments

@planetcrypton
Copy link

I've got more than one menu I want to target with mobileMenu (just 2 in my case).
But only the first instance is executed correctly.
The second one doesn't get the select-element prepended in the DOM, but it's UL-element will be hidden (display:none).
If I change the order, the opposite happens.

Here's my code:

// mobile menu
$('#menu-main').mobileMenu({
topOptionText : DL.txt.selectPage,
prependTo : '.top_menu .menu',
indentString: '   ',
switchWidth : 768
});
$('#menu-left').mobileMenu({
topOptionText : DL.txt.selectPage,
prependTo : '.secondary',
indentString: '   ',
switchWidth : 479
});

@mattkersley
Copy link
Owner

Looking at the code you've pasted, you may be using an older version.
Try updating to the new one and re-read the readme file.

Let me know if using the newer version helps or not.

@planetcrypton
Copy link
Author

I was using the latest version. But correct; that 'indentString' option is a copy-paste from some last year's code.
Nevertheless; the rest should be compatible with the latest version.
Also when I comment out the indentString-option it doesn't change anything....
Another 'symptom' I noticed: when I scale the browser back to a wider width, the first UL-menu doesn't become visible (still display:none). The dropdown gets hidden as it should.

@planetcrypton
Copy link
Author

Is there any news on this issue, of not being able to have more than one mobileMenu's?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants