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

Initialize with non-root elements selected #6

Merged
merged 2 commits into from
Mar 15, 2017
Merged

Conversation

lakesta
Copy link
Contributor

@lakesta lakesta commented Mar 14, 2017

This code change solves issue #3 by allowing you to set a non-root level element to be selected easily via adding class, "menu__link--current" to the current menu__link item. The menu will then be initialized by opening to the proper submenu with working breadcrumbs and back buttons.

@GitFrankie
Copy link

This is great, but doesn't work in IE 10, 11, Edge? I understand it wouldn't work in IE 9 and below, but support for the most recent, more modern versions would be awesome.

@lakesta
Copy link
Contributor Author

lakesta commented Apr 7, 2017

@GitFrankie Add this to the bottom of your ml-menu.js file and it should work in IE

(function () {
    if ( typeof NodeList.prototype.forEach === "function" ) return false;
    NodeList.prototype.forEach = Array.prototype.forEach;
})();

@GitFrankie
Copy link

This works! Thank you, I really appreciate the help.

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

Successfully merging this pull request may close these issues.

3 participants