Open bryanburgers opened 10 years ago
I would also like to see a change like this. When first playing around with this jQuery plugin, I actually expected that the classes given as parameters are used within jQuery selectors to identify the items to be used - not to actually SET them using jQuery.
Another issue that would be solved when using the classes to select/find items: I have a top level navigation where not every item has a mega menu dropdown. Some top level items are just links. The current plugin initialization appends the dropdown menu class to the actual link item, which breaks the navigation in some cases (in my case, responsive design with hidden navigation on small screen).
The structure of my navigation has an extra element between the
nav
and theul
, and so breaks Accessible Mega Menu.Potential options to fix this:
nav.find('.' + settings.menuClass').first()
instead ofnav.children().first()
. This would require that the menu class exists already, though.nav.find(settings.menuSelector).first()
.