Why Does That Hamburger Menu Not Work?
Can you tell me why that hamburger menu doesnt work? I really didn't find an answer ;( The connection HTML/Javascript is okay. What I must say is that I do not understand Javascrip
Solution 1:
I just copied your code to a JSFiddle, it pretty much works. You either:
By the way, the burger icon won't show unless you resize your window to a smaller width.
Try adding to your <head>
:
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
Solution 2:
Here is working DEMO of your code.
Try adding jQuery file under <head>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link type="text/css" href="reset.css">
<link type="text/css" href="style.css">
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="nav.js"></script>
</head>
Post a Comment for "Why Does That Hamburger Menu Not Work?"