Sha256: bdc9bb6e571bb0c7256ddc6b3fbf04fdd0609546b7da41250ca6dda9092a79d3

Contents?: true

Size: 721 Bytes

Versions: 3

Compression:

Stored size: 721 Bytes

Contents

/**
 * nav.js
 * JavaScript functions for the main navigation menu (used on small screens)
 * and for the modal box.
 */

const openMenu = document.getElementById('openmenu');
const closeMenu = document.getElementById('closemenu');
const navMenu = document.querySelectorAll('header nav')[0];
openMenu.addEventListener('click', function() { navMenu.style.width = 'auto'; });
closeMenu.addEventListener('click', function() { navMenu.style.width = ''; });

const openModal = document.getElementById('openmodal');
const modal = document.getElementById('modal');
openModal.addEventListener('click', function() { modal.style.display = 'block'; });
modal.addEventListener('click', function() { modal.style.display = 'none'; });

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
intranet-core-2.4.3 lib/intranet/resources/www/nav.js
intranet-core-2.4.1 lib/intranet/resources/www/nav.js
intranet-core-2.4.0 lib/intranet/resources/www/nav.js