<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$('.navbar-collapse').on('click', function () {
$('.navbar-collapse').collapse('hide');
$a = $($(this).attr('href'));
$('html,body').animate({ scrollTop: $a.offset().top - 50}, 500);
return false;
});
</script>
<script type="text/javascript" src="/assets/house/js/jquery.js"></script>
<script type="text/javascript" src="/assets/house/js/bootstrap.min.js"></script>
<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=true(30 minutes)"></script>
<script type="text/javascript" src="/assets/house/js/jquery.inview.min.js"></script>
<script type="text/javascript" src="/assets/house/js/wow.min.js"></script>
<script type="text/javascript" src="/assets/house/js/mousescroll.js"></script>
<script type="text/javascript" src="/assets/house/js/smoothscroll.js"></script>
<script type="text/javascript" src="/assets/house/js/jquery.countTo.js"></script>
<script type="text/javascript" src="/assets/house/js/lightbox.min.js"></script>
<script type="text/javascript" src="/assets/house/js/main.js"></script>
<script src="/assets/house/js/jjj/owl.carousel.min.js"></script>
<script src="/assets/house/js/jjj/jquery.parallax-1.1.3.js"></script>
<script src="/assets/house/js/jjj/jquery.nicescroll.min.js"></script>
<script src="/assets/house/js/jjj/jquery.appear.js"></script>
<script src="/assets/house/js/jjj/jquery.nav.js"></script>
<script src="/assets/house/js/jjj/jquery.sticky.js"></script>
<script src="/assets/house/js/jjj/jquery.fitvids.js"></script>
<script src="/assets/house/js/jjj/custom.js"></script>
<script>
$(".menu_btn").click(function() {
$(".header").toggleClass("open_menu");
});
$(document).mouseup(function(e) {
var $target = $(e.target);
if ($target.closest(".header").length == 0 && $target.closest(".menu_btn").length == 0) {
$(".header").removeClass("open_menu");
}
});
</script>
<div class="main-nav">
<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="#">
<h1><img class="img-responsive" src="logo.jpg" alt="logo"></h1>
</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="scroll active"><a href="#home-slider">Пункт1</a></li>
<li class="scroll"><a href="#services">Пункт2</a></li>
<li class="scroll"><a href="#portfolio">Пункт3</a></li>
<li class="scroll"><a href="#about-us">Пункт4</a></li>
<li class="scroll"><a href="#team">Пункт5</a></li>
<li class="scroll"><a href="#contact">Пункт6</a></li>
</ul>
</div>
</div>
</div>
Меню закрылось после клика,но повторно уже не открывается.Заранее благодарю.