I've been struggling to get my hamburger menu to work properly for a while now. I've tried various solutions, but it seems like I just can't get it to open (Menu not opening is the issue :( ),
The tutorial I followed to create this menu can be found here -> Youtube Link
If you have any suggestions on how to fix this or if you know of a similar post that could help me out, please let me know. Thank you!
$(document).ready(function() {
$(".burger-nav").on("click", function() {
$("header nav ul").toggleClass("open");
});
});
header nav ul {
height: 0;
overflow: hidden;
background: #6134A3;
}
header nav ul.open {
height: auto;
}
.burger-nav {
padding: 0px;
margin: 0px;
display: block;
height: 40px;
width: 100%;
cursor: pointer;
background-image: url(images/nav.png);
background-repeat: no-repeat;
background-size: 10%;
background-position: 97%;
background-color: #502196;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<head>
<title>MENU</title>
<link rel="stylesheet" href="slicknav.css" />
<script language="JavaScript" type="text/javascript" scr="http://code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<style>
</style>
<body>
<header>
<div class="wrapper">
<nav>
<a class="burger-nav"></a>
<ul>
<li><a href="#">item 1</a></li>
<li><a href="#">item 2</a></li>
<li><a href="#">item 3</a></li>
<li><a href="#">item 4</a></li>
</ul>
</nav>
</div>
</header>
<!--watch this video to finish drop down https://www.youtube.com/watch?v=FDh7Mdl2oww -->
<script language="JavaScript" type="text/javascript" scr="menu.js"></script>
</body>