diff --git a/menu-inject.js b/menu-inject.js new file mode 100644 index 0000000..ed5f1dc --- /dev/null +++ b/menu-inject.js @@ -0,0 +1,12 @@ +// Assuming you have an element with the ID "menu" where you want to inject the menu +const menuElement = document.getElementById('menu'); + +// Fetch the menu content from menu.html +fetch('menu.html') + .then(response => response.text()) + .then(data => { + menuElement.innerHTML = data; + }) + .catch(error => { + console.error('Error fetching menu:', error); + });