Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double menu. #8

Open
pafnuty opened this issue Oct 30, 2013 · 1 comment
Open

Double menu. #8

pafnuty opened this issue Oct 30, 2013 · 1 comment

Comments

@pafnuty
Copy link

pafnuty commented Oct 30, 2013

Hello! Thanks for the great plugin, it is the only one that suited my needs. But in the process of using one revealed a bug:
If I move script to the end of the page - is a duplication of the menu.
demo: https://github.com/pafnuty/mobile-menu/blob/master/demo/index.html

@MikyKuroneko
Copy link

Same here. After looking carefully at what happens I saw that the domready event is fired twice when mobile-menu is used. I have the JS files at the bottom too.

EDIT: A quick fix: check if $("#build-menu") or $("#build-menu-page") exist right after your domready event, and wrap all code under this condition. This way a second domready event triggering won't cause all your code to execute twice.

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

No branches or pull requests

2 participants