Reputation: 440
<!-- navbar-->
<nav class="navbar navbar-default">
<div class="container-fluid">
<a href="#" class="navbar-header navbar-brand">MYSITE</a>
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tags <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">menu1</a></li>
<li><a href="#">menu2</a></li>
<li><a href="#">menu3</a></li>
<li><a href="#">menu4</a></li>
<li><a href="#">menu5</a></li>
<li><a href="#">menu6</a></li>
<li><a href="#">menu7</a></li>
<li><a href="#">menu8</a></li>
<li><a href="#">menu9</a></li>
<li><a href="#">menu10</a></li>
<li><a href="#">menu11</a></li>
<li><a href="#">menu12</a></li>
<li><a href="#">menu13</a></li>
<li><a href="#">menu14</a></li>
<li><a href="#">menu15</a></li>
<li><a href="#">menu16</a></li>
<li><a href="#">menu17</a></li>
<li><a href="#">menu18</a></li>
<li><a href="#">menu19</a></li>
</ul>
</li>
</ul>
</div>
</nav>
I am learning bootstrap and i am trying to create a layout through the same. My dropdown menu is not working and am not able to detect the fault. Please help!
Upvotes: 1
Views: 1120
Reputation: 962
Its working fine, You need to add jquery
, Bootstrap ja
, Bootstrap CSS` then if will work
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<!-- navbar-->
<nav class="navbar navbar-default">
<div class="container-fluid">
<a href="#" class="navbar-header navbar-brand">MYSITE</a>
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tags <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">menu1</a></li>
<li><a href="#">menu2</a></li>
<li><a href="#">menu3</a></li>
<li><a href="#">menu4</a></li>
<li><a href="#">menu5</a></li>
<li><a href="#">menu6</a></li>
<li><a href="#">menu7</a></li>
<li><a href="#">menu8</a></li>
<li><a href="#">menu9</a></li>
<li><a href="#">menu10</a></li>
<li><a href="#">menu11</a></li>
<li><a href="#">menu12</a></li>
<li><a href="#">menu13</a></li>
<li><a href="#">menu14</a></li>
<li><a href="#">menu15</a></li>
<li><a href="#">menu16</a></li>
<li><a href="#">menu17</a></li>
<li><a href="#">menu18</a></li>
<li><a href="#">menu19</a></li>
</ul>
</li>
</ul>
</div>
</nav>
Upvotes: 3