Hi! I used bootstrap dropdown menu. But I want click submenu alert id value. Now I click submenu its show text. Can anybody help me?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/jquery.min-1.12.4.js"></script>
<script src="js/bootstrap.min-3.3.7.js"></script>
</head>
<body>
<div class="container-fluid" >
<div class="row">
<div class="col-md-12">
<nav class="navbar navbar-default " role="navigation" style="z-index: 1000; background-color: #325c94;">
<div class="container" >
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-left" style="z-index: 1000;">
<li class="dropdown">
<a href="index.php" style="color: white;">Main page</a>
<ul>
</ul>
</li>
<li class="dropdown">
<a href="#" style="color: white;" class="dropdown-toggle" data-toggle="dropdown">Control institut <b class="caret"></b></a>
<ul class="dropdown-menu">
<li id="сохтор"><a href="#">Structure institut</li>
<li id="рохбарият"><a href="#">Header institut</a></li>
</ul></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>
</body>
</html>
<script>
$('.dropdown-menu li').on('click', function(){
alert($(this).text());
});
</script>