new: make the menu visible on mobile

This commit is contained in:
Valentin Lab
2025-12-13 20:10:42 +01:00
parent ebdf0c0d8e
commit 1db3725fb2
6 changed files with 82 additions and 35 deletions

View File

@@ -348,4 +348,31 @@ div.megamenu ul.megamenu li.megamenu.level1
.dropdown-menu > li:hover > .submenu{
display: block;
}
}
}
@media (max-width: 991.98px){
#navbarContentMobile .navbar-nav {
flex-direction: column;
}
#navbarContentMobile .navbar-nav .col {
flex: 0 0 100%;
max-width: 100%;
}
#navbarContentMobile .dropdown-menu {
display: block;
position: static;
float: none;
box-shadow: none;
background: transparent;
}
#navbarContentMobile .dropdown-toggle::after {
display: none;
}
#navbarContentMobile .dropdown-menu .container,
#navbarContentMobile .dropdown-menu .row {
margin: 0;
}
#navbarContentMobile .dropdown-menu .shadow {
box-shadow: none !important;
}
}

View File

@@ -32,12 +32,14 @@ $(document).on('click', '.dropdown-menu', function (e) {
// make it as accordion for smaller screens
if ($(window).width() < 992) {
$('.dropdown-menu a').click(function(e) {
e.preventDefault();
if ($(this).next('.submenu').length) {
$(this).next('.submenu').toggle();
var $submenu = $(this).next('.submenu');
if ($submenu.length) {
e.preventDefault();
$submenu.toggle();
}
$('.dropdown').on('hide.bs.dropdown', function () {
$(this).find('.submenu').hide();
});
});
$('.dropdown').on('hide.bs.dropdown', function () {
$(this).find('.submenu').hide();
});
}