Nnn
Nnn

Reputation: 69

Bootstrap responsive menu and dropdown not expanding

I followed all the instructions from a tutorial that I watched but the responsive menu is not expanding? Even the dropdown is not working. When I click the button nothing's happening, it's only changing its color. What could I be doing wrong?

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head      content must come *after* these tags -->
<title></title>

<!-- Bootstrap -->
 <link href="view/css/bootstrap.min.css" rel="stylesheet">
<link href="view/css/styles.css" rel="stylesheet">
<script src="js/respond.js"></script>
<script src="view/js/bootstrap.min.js"></script>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>

<div class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
  <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
    <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#"><img src="view/images/logo.png">
        </div>
        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
              <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">The Institution <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="">About the Institute</a></li>
                <li><a href="">Research & Programs</a></li>
                <li><a href="">Board of Advisers</a></li>
                <li><a href="">Educational Quality Team</a></li>
              </ul>
              </li>
              <li><a href="#">The Center</a></li>
              <li><a href="#">Opportunity</a></li>
              <li><a href="#">Get In Touch</a></li>

            </ul>
        </div>  
 </div></div>

JS

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>

Upvotes: 0

Views: 5814

Answers (2)

Nnn
Nnn

Reputation: 69

It's working now I just edited this part

JS

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

and also deleted everything except for this

<script src="js/respond.js"></script>

thanks to everyone who answered! :)

Upvotes: 1

Macsupport
Macsupport

Reputation: 5444

You have bootstrap.js included twice, once before jQuery is loaded. Remove

<script src="view/js/bootstrap.min.js"></script>

in your head section

Upvotes: 0

Related Questions