0
I’m making a menu with Dropdown using bootstrap
. That when you click on the login button it displays the fields for the user to enter the email and password. However, when you click the button the form is not displayed. Follow an image and the code HTML and JS to explain better what I need.
$(document).ready(function(){
//Handles menu drop down
$('.dropdown-menu').find('form').click(function (e) {
e.stopPropagation();
});
});
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Resenha Informal</title>
<script rel="script" src="Scripts/jquery-3.1.0.js"></script>
<link rel="stylesheet" href="CSS/bootstrap-3.3.7/bootstrap-3.3.7/dist/css/bootstrap.css">
<link rel="stylesheet" href="CSS/bootstrap-3.3.7/bootstrap-3.3.7/dist/js/bootstrap.js">
<script rel="script" src="Scripts/Site.js"></script>
<link rel="stylesheet" href="CSS/Site.css">
</head>
<body>
<div class="container">
data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
</button>
<a class="navbar-brand" href="#">Brand Name</a></div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="#"><i class="glyphicon glyphicon-plus-sign"></i> Register</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="glyphicon glyphicon-user"></i> Sign In</a>
<div class="dropdown-menu form-login stop-propagation" role="menu">
<div class="form-group">
<label for="exampleInputEmail1"><i class="glyphicon glyphicon-envelope"></i> Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email" /></div>
<div class="form-group">
<label for="exampleInputPassword1"><i class="glyphicon glyphicon-lock"></i> Password</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" /></div>
<button type="submit" class="btn btn-success btn-block"><i class="glyphicon glyphicon-ok"></i> Submit</button>
</div>
</li>
</ul>
</div>
</div>
</nav>
</div>
</body>
</html>
How do I solve this problem ?