1
(function (e) {
2
"use strict";
3
var n = window.AFTHRAMPES_JS || {};
4
n.mobileMenu = {
5
init: function () {
6
this.toggleMenu(), this.menuMobile(), this.menuArrow();
7
8
if (e('.aft-mobile-navigation').length) {
9
10
var navElement = document.querySelector(".aft-mobile-navigation");
11
if (navElement) {
12
n.trapFocus(navElement);
13
}
14
15
16
}
17
},
18
toggleMenu: function () {
19
e('#masthead').on('click', '.toggle-menu', function (event) {
20
var ethis = e('.main-navigation .menu .menu-mobile');
21
if (ethis.css('display') == 'block') {
22
ethis.slideUp('300');
23
} else {
24
ethis.slideDown('300');
25
}
26
e('.ham').toggleClass('exit');
27
});
28
e('#masthead .main-navigation ').on('click', '.menu-mobile a button', function (event) {
29
event.preventDefault();
30
var ethis = e(this),
31
eparent = ethis.closest('li');
32
if (eparent.find('> .children').length) {
33
var esub_menu = eparent.find('> .children');
34
} else {
35
var esub_menu = eparent.find('> .sub-menu');
36
}
37
if (esub_menu.css('display') == 'none') {
38
esub_menu.slideDown('300');
39
ethis.addClass('active');
40
} else {
...
</html>