simplification js
This commit is contained in:
parent
61950032d1
commit
0d49eb1c7c
@ -24,17 +24,11 @@ $(function() {
|
||||
});
|
||||
// un sous-menu dans initiatives : .menu-entree.sousinitiatives > .menu-items__lien.sousinitiatives
|
||||
// .menu-entree.sousinitiatives > ul > li > a
|
||||
$('.page_wrapper').append('<div class="menucache"></div>');
|
||||
$('.menu-items__lien.sousinitiatives').on('click', function(){
|
||||
$('.menucache').toggleClass('cache');
|
||||
$(this).toggleClass('actif');
|
||||
$(this).siblings('ul').toggleClass('ouvert');
|
||||
$(this).parent().siblings('.sousinitiatives').find('ul.ouvert').removeClass('ouvert');
|
||||
});
|
||||
$('.menucache').on('click', function(){
|
||||
$('.menucache').removeClass('cache');
|
||||
$('.menu-items__lien.sousinitiatives').removeClass('actif').siblings('ul').removeClass('ouvert');
|
||||
});
|
||||
|
||||
// placer le html du bouton du menu, visible < medium
|
||||
$('.nav.principale').prepend('<button type="button" class="btn-nav"><span class="ham"></span>MENU</button>');
|
||||
|
Loading…
Reference in New Issue
Block a user