I need help with the flyout menu on my website usaletsgo.de. Specifically, I am looking to add a third page to the existing two pages in the red flyout located at the upper left corner of the site.
Currently, when switching between page 1 and page 2, list elements toggle between the css classes .visible and .hidden. The CSS code for this functionality is:
.visible{
display:block;
}
.hidden{
display:none;
}
The JS and HTML code snippet used for toggling list elements between visibility states is as follows:
<script>
function switch(){
$('.toggle').toggleClass('visible hidden');
};
</script>
<li class="toggle visible">Factory Butte </a></li>
... (list of other li elements)
<li class="toggle visible"> <a href="javascript:switch()">Page 2</a></li>
<li class="toggle hidden"> <a href="javascript:switch()">Page 1</a></li>
While this code may not be very advanced, it serves its purpose effectively. As a Javascript beginner, I am trying to figure out how to incorporate a third page into the existing functionality. Any suggestions or guidance would be appreciated!