@insite/overlay--accordion
v0.0.3
Published
Overlay with accordion
Downloads
5
Readme
@insite/OverlayAccordion.js
Construit un menu en overlay (via Overlay.js extends) et transforme les menus drupal qu'il contient en accordéon via Accordion.js
- @param {HTMLElement} navigations
- @param {Object} options
- class: 'overlay-menu'
- overlayClass: 'overlay-menu__overlay'
- overlayClassActive: 'is-open'
- destination: 'body'
- buttonClass: 'button--overlay'
- buttonClassActive: 'is-open'
- buttonTexts: ['Ouvrir', 'Fermer']
- buttonDestination: '.region-header'
- closeButtonText: false
- closeButtonClass: 'button--close'
- transitionType: 'left-slide'
- viewportProportion: 100
- freezeScroll: true
- oneByOne: true
Usage :
new OverlayAccordion(settings.mobile_menu, {
destination: destination,
transitionType: 'left-slide',
buttonDestination: '.region-header',
buttonClass: ["hamburger--slider"],
closeButtonText: 'Fermer la recherche',
closeButtonClass: 'button--close',
title_panel: true,
buttonClassActive: ["is-active"],
buttonTexts: ['<span class="hamburger-box"><span class="hamburger-inner"></span></span>', '<span class="hamburger-box"><span class="hamburger-inner"></span></span>'],
oneByOne: true
});