codrops / MultiLevelMenu

A simple menu with multiple levels and an optional breadcrumb navigation and back button.
232 stars 83 forks source link

Problem IE11 #8

Open jripa opened 6 years ago

jripa commented 6 years ago

IE 11 have Problems take a forEach method on NodeList. Resolve them by add this to main.js

    function NodeListToArray(nl) {
          for(var a=[], l=nl.length; l--; a[l]=nl[l]);
         return a;
     }

and var items = menuEl.querySelectorAll('.menu__item'); items = Array.isArray(items) ? items : NodeListToArray(items);

        items.forEach(function(itemEl, iPos) { ...

and

                   var links = menuEl.querySelectorAll('.menu__link');
                    **links = Array.isArray(links) ? links : NodeListToArray(links);**

        links.forEach(function(linkEl, lPos) {
rejas commented 6 years ago

Hi @jripa thx for the bug report. I only maintain a fork of this repo over at https://github.com/rejas/multilevelmenu, but I added a fix for IE 11 in there if you want to check it out.

bryanyong98 commented 4 years ago

Hi @rejas, i too have an issue regarding opening this menu on IE11. The menu items won't display in IE at all. Here's the picture of my menu and my IE 11 version.

proof-pic IE
rejas commented 4 years ago

hey @bryanyong98 I dont actively maintain or use my fork anymore. Feel free to use it on your own risk.