Hello!
There is an idea to make 1 html page, but with different content.
The point is to place all the content on the page at once, and when selecting menu items, it is easy to change the class of visibility in some elements and thus switch the displayed content on the page.
Actually a request: help with a script that changes the class of the selected menu item li itself to active and assigns classes to arbitrary house elements.
Found a script, but it does not work for such links, but in js it is not strong ...
I will use the menu like this:
window.addEventListener("load",function(){ var myLinks = document.querySelectorAll("#menu a"); for(var i=0; i<myLinks.length; i++) if(location.href==myLinks[i].href){ myLinks[i].parentNode.classList.add("active"); } }); <div id="menu"> <ul> <li><a href="#1"><div class="miN"></div><span class="mt">{{LMN1}}</span><span class="mb">{{LMN2}}</span></a></li> <li><a href="#2"><div class="miS"></div><span class="mt">{{LMS1}}</span><span class="mb">{{LMS2}}</span></a></li> <li><a href="#3"><div class="miC"></div><span class="mt">{{LMC1}}</span><span class="mb">{{LMC2}}</span></a></li> <li><a href="#4"><div class="miM"></div><span class="mt">{{LMSc1}}</span><span class="mb">{{LMSc2}}</span></a></li> </ul> </div>