Skip to content
Snippets Groups Projects
Commit 4784f72d authored by Chris Lawton's avatar Chris Lawton
Browse files

removing mobile submenu functionality as we have no need for it

parent c3562c07
No related branches found
No related tags found
No related merge requests found
class MobileSubMenu {
static selector() {
return '.header__menus--mobile .js-open-subnav';
}
constructor(node) {
this.node = node;
this.bindEventListeners();
}
bindEventListeners() {
this.node.on('click', (e) => {
e.preventDefault();
this.open();
});
}
open() {
this.node[0].parentElement.nextElementSibling.classList.add('is-visible');
}
}
export default MobileSubMenu;
import $ from './globals';
import MobileMenu from './components/mobile-menu';
import MobileSubMenu from './components/mobile-sub-menu';
import DesktopSearch from './components/desktop-search';
// Open the mobile menu callback
......@@ -20,10 +19,6 @@ $(function () {
new MobileMenu($(el), openMobileMenu, closeMobileMenu);
});
$(MobileSubMenu.selector()).each((index, el) => {
new MobileSubMenu($(el));
});
$(DesktopSearch.selector()).each((index, el) => {
new DesktopSearch($(el), $('.header__search--desktop'));
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment