Im making a webpage and id like to have it so that the menu with subpages stays open after i click on the subpage. The menu is written in a js file, as a template header using innerhtml like such:
const headerTemplate = document.createElement('template');
headerTemplate.innerHTML = `
<style>
/*general settings ... same in default.css ... FROM HERE ...*/
html {min-height: 100%;}
* {
margin: 0;
padding: 0;
}
I take it it isnt possible to run js scripts inside this innerhtml code? how could i get around this? I cant even access id's from within this innerhtml.