In my portfolio project there are some common html code snippet on about, projects, contact.html pages like navbar,footer and sidebar. The main app.js file contains toggling sidebar functionality, mouseover event on menus to open submenu, hint text on icon hover etc How to add these functionality on every html pages.
We link app.js to every html pages, but there were showing various error like various element undefined since app.js has more code and element selection.