This commit is contained in:
Ludovic CANDELLIER
2022-04-13 23:49:48 +02:00
parent 6e133246cf
commit 9c2b9cf02e
56 changed files with 948 additions and 336 deletions

View File

@@ -1,18 +1,17 @@
// Prevent closing from click inside dropdown
$(document).on('click', '.dropdown-menu', function (e) {
e.stopPropagation();
});
});
// 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();
// 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();
}
$('.dropdown').on('hide.bs.dropdown', function () {
$(this).find('.submenu').hide();
})
$(this).find('.submenu').hide();
});
});
}
}