.mob-nav ,.mob-nav h2 {
position: relative;
margin: 0;
width: 100%;
font-size: 14px;
font-weight: 400;
font-family: 'IBM Plex Sans', sans-serif;
line-height: 1.05;
letter-spacing: 0.085em;
background: transparent;
text-transform: uppercase;
overflow-y: scroll;
}
.mob-nav ul {
list-style: none;
margin: 0;
padding: 0;
}
.mob-nav ul li {
list-style: none !important;
}
.mob-nav ul li a {
display: block;
background: transparent;
padding: 10px 10px 15px 0;
color: white;
text-decoration: none;
border-bottom: 1px solid #7A7A7A66;
}
.mob-nav ul li a:hover {
background: transparent;
color: #5A9102;
}
.mob-nav ul li a .fa {
width: 16px;
text-align: center;
margin-right: 5px;
float: right;
}
.mob-nav ul ul {
background-color: transparent;
display: none; /* Hide all submenus by default */
}
.mob-nav ul ul.show {
display: block; /* Show submenus with the 'show' class */
}
.mob-nav ul li ul li a {
background: transparent;
padding: 10px 20px;
color: white;
}
.mob-nav ul li ul li a:hover {
background: transparent;
color: #5A9102;
}
.mob-nav ul li a.active {
border-bottom: none !important;
}
document.addEventListener('DOMContentLoaded', function() {
var submenuLinks = document.querySelectorAll('.sub-menu > h2 > a');
submenuLinks.forEach(function(link) {
link.addEventListener('click', function(event) {
// Get the submenu for the clicked link
var submenu = this.parentElement.nextElementSibling;
// Check if the clicked submenu is already visible
var isVisible = submenu.classList.contains('show');
// Hide all submenus
document.querySelectorAll('.mob-nav ul ul').forEach(function(otherSubmenu) {
otherSubmenu.classList.remove('show');
});
// Remove active class from all submenu links
submenuLinks.forEach(function(otherLink) {
otherLink.classList.remove('active');
// Reset caret icons to default state
var caret = otherLink.querySelector('.fa');
if (caret) {
caret.classList.remove('fa-caret-up');
caret.classList.add('fa-caret-down');
}
});
// If the clicked submenu was not visible, show it
if (!isVisible) {
submenu.classList.add('show');
this.classList.add('active');
// Toggle the caret icon
var caret = this.querySelector('.fa');
if (caret) {
caret.classList.remove('fa-caret-down');
caret.classList.add('fa-caret-up');
}
}
});
});
});
.mob-nav ,.mob-nav h2 {
position: relative;
margin: 0;
width: 100%;
font-size: 14px;
font-weight: 400;
font-family: 'IBM Plex Sans', sans-serif;
line-height: 1.05;
letter-spacing: 0.085em;
background: transparent;
text-transform: uppercase;
overflow-y: scroll;
}
.mob-nav ul {
list-style: none;
margin: 0;
padding: 0;
}
.mob-nav ul li {
list-style: none !important;
}
.mob-nav ul li a {
display: block;
background: transparent;
padding: 10px 10px 15px 0;
color: white;
text-decoration: none;
border-bottom: 1px solid #7A7A7A66;
}
.mob-nav ul li a:hover {
background: transparent;
color: #5A9102;
}
.mob-nav ul li a .fa {
width: 16px;
text-align: center;
margin-right: 5px;
float: right;
}
.mob-nav ul ul {
background-color: transparent;
display: none; /* Hide all submenus by default */
}
.mob-nav ul ul.show {
display: block; /* Show submenus with the 'show' class */
}
.mob-nav ul li ul li a {
background: transparent;
padding: 10px 20px;
color: white;
}
.mob-nav ul li ul li a:hover {
background: transparent;
color: #5A9102;
}
.mob-nav ul li a.active {
border-bottom: none !important;
}
document.addEventListener('DOMContentLoaded', function() {
var submenuLinks = document.querySelectorAll('.sub-menu > h2 > a');
submenuLinks.forEach(function(link) {
link.addEventListener('click', function(event) {
// Get the submenu for the clicked link
var submenu = this.parentElement.nextElementSibling;
// Check if the clicked submenu is already visible
var isVisible = submenu.classList.contains('show');
// Hide all submenus
document.querySelectorAll('.mob-nav ul ul').forEach(function(otherSubmenu) {
otherSubmenu.classList.remove('show');
});
// Remove active class from all submenu links
submenuLinks.forEach(function(otherLink) {
otherLink.classList.remove('active');
// Reset caret icons to default state
var caret = otherLink.querySelector('.fa');
if (caret) {
caret.classList.remove('fa-caret-up');
caret.classList.add('fa-caret-down');
}
});
// If the clicked submenu was not visible, show it
if (!isVisible) {
submenu.classList.add('show');
this.classList.add('active');
// Toggle the caret icon
var caret = this.querySelector('.fa');
if (caret) {
caret.classList.remove('fa-caret-down');
caret.classList.add('fa-caret-up');
}
}
});
});
});