Skip to content Skip to sidebar Skip to footer

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>:

<scriptsrc="https://code.jquery.com/jquery-2.2.4.min.js"></script><linkhref="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"crossorigin="anonymous"><scriptsrc="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><metacharset="UTF-8"><linktype="text/css"href="reset.css"><linktype="text/css"href="style.css"><scriptsrc="https://code.jquery.com/jquery-2.2.4.min.js"></script><scripttype="text/javascript"src="nav.js"></script></head>

Post a Comment for "Why Does That Hamburger Menu Not Work?"