themefoundation / mo-js

Menu Object. A mobile-first, progressibly enhanced menu system.
22 stars 4 forks source link

Add support for opening submenus when parent has focus #5

Closed stephenharris closed 10 years ago

stephenharris commented 10 years ago

As mentioned in an e-mail a while back, I modified the menu to be keyboard accessible.

It works for 1-3 levels (not tried deeper). I'm not sure if it's the best method, but does seem to work pretty well. It works by finding all its parents and giving them the openSubmenuClass class, which is used by to toggle visibility of the submenus when viewed on a mobile device.