Boostrap JavaScript not working

Boostrap JavaScript not working
0.0 0

#1

Im following Colt Steele’se bootcamp but i cant make my hamburger menu which appears when resizing in nav bar work when i click on it. On his it works but on mine no way at all. I placed all sources how they should be. Please help!
HTML:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>Test Page</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        <link rel="stylesheet" type="text/css" media="screen" href="test.css">
    </head>
<body>
 
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
              <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="#"><span class="glyphicon glyphicon-picture" aria-hidden="true"></span>
                IMGS
            </a>
          </div>
          <div class="collapse navbar-collapse" id="bs-nav-demo">
              <ul class="nav navbar-nav">
                  <li><a href="#">About</a></li>
                  <li><a href="#">Contact</a></li>
              </ul>
              <ul class="nav  navbar-nav navbar-right">
                  <li><a href="#">Sing up</a></li>
                  <li><a href="#">Login</a></li>
              </ul>
          </div>
        </div>
    </nav>

    <div class="container">

        <div class="jumbotron">
            <h1><span class="glyphicon glyphicon-camera" aria-hidden="true"></span> Image Gallery</h1>
            <p>A bunch of beautiful images that i didn't take(except for the first one!)</p>
        </div>

        <div class="row">
            
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
            
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
            
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
        
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
                
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
                
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>

            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
                    
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
                    
            <div class="col-lg-4 col-sm-6">
                <div class="thumbnail">
                    <img src="http://i.imgur.com/qK42fUu.jpg">
                </div>
            </div>
        
        </div>
    
    </div>
    


<script src="https://code.jquery.com/jquery-2.2.4.js" integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>

CSS if needed:

body {
    padding-top: 70px;
}

.jumbotron {
    color:#2c3e50;
    background: #ecf0f1;
    
}

.navbar-inverse {
    background: #2c3e50;
}

.navbar-inverse .navbar-nav>li>a {
    color: white;
}

.navbar-inverse .navbar-brand {
    color: white;
}

#2

Your data-target attribute should reference the id of the div with class=“collapse navbar-collapse”. Currently, it references something different.


#3

Omg i forgot about that one when writing the code. I literaly copy pasted source links many times to test it out. Thanks alot. Its always about one tinny detail that i miss.