Sha256: d846c1dd1c18c09d5f3978b233a2fa4f8003ba91462a32edbaf0b06257c6532c
Contents?: true
Size: 565 Bytes
Versions: 169
Compression:
Stored size: 565 Bytes
Contents
const NAVBAR_COLLAPSE_ID = 'headerGlobalNavbarContent'; const HEADER_GLOBAL = '.header-global'; function addClassToOpenNavbar() { if ( ! document.getElementById(NAVBAR_COLLAPSE_ID) ) return; const collapse = document.getElementById(NAVBAR_COLLAPSE_ID); const header = document.querySelector(HEADER_GLOBAL); $(collapse).on('show.bs.collapse', (e) => { header.classList.add('header-global__open'); }); $(collapse).on('hide.bs.collapse', (e) => { header.classList.remove('header-global__open'); }); } export default addClassToOpenNavbar;
Version data entries
169 entries across 169 versions & 3 rubygems