I have recently started using browserify and have created a custom module to toggle two menus based on the ID clicked and apply a transparent overlay effect behind the menu. I have got it working but just wanted to get some feedback on weather it can improved performance or coding wise as I am wanting to improve my JS skills./*** Require modules*/var dullBackground = require('./dullBackground');/*** Export module*/module.exports = function() {  'use strict';  /**  * Selectors  */  var menu = document.getElementById('nav-main');  var panel = document.getElementById('overlay-panel');  var productsPanel = document.getElementById('products-panel');  var systemsPanel = document.getElementById('systems-panel');  var close = document.getElementById('overlay-close');  var activeClass = 'active';  var hideClass = 'hide';  /**  * Methods  */  function togglePanel(event) {    // Selectors    var elementId = event.target.id;    event.preventDefault();    // Conditions    if(elementId === 'page-products' || elementId === 'page-systems') {      dullBackground();      panel.classList.add(activeClass);    }    if(elementId === 'page-products') {      productsPanel.classList.remove(hideClass);    }    if(elementId === 'page-systems') {      systemsPanel.classList.remove(hideClass);    }  }  function closePanel(event) {    // Actions    panel.classList.remove(activeClass);    event.preventDefault();    // Conditions    if(!productsPanel.classList.contains(hideClass)) {      productsPanel.classList.add(hideClass);    }    if(!systemsPanel.classList.contains(hideClass)) {      systemsPanel.classList.add(hideClass);    }  }  /**  * Events/APIs/init  */  menu.addEventListener('click', togglePanel, false);  close.addEventListener('click', closePanel, false);};
Toggling menus based on an ID
javascript;performance