I would like to include a HTML menu in a separate file using jQuery so I don't have to change all the pages every time I change something in menu. I have the following code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Title</title>
<link href="style.css" rel="stylesheet">
<script src="jquery-3.2.1.min.js"></script>
</head>
<body>
<script>$(".top-menu").load("menu.html");</script>
</br>
<div>
Some text
<audio autoplay><source src="some-sound.mp3" type="audio/mpeg"></audio>
</div>
</body>
</html>
The menu is in file "menu.html":
<nav class="top-menu">
<ul class="menu-main">
<li><a href="pageone.html">One</a></li>
<li><a href="pagetwo.html">Two</a></li>
<li><a href="pagethree.html">Three</a></li>/
<li><a href="pagefour.html">Four</a></li>
</ul>
</nav>
But the menu doesn't show up on this page. What is wrong with the code?