I am struggling to replicate the functionality of the user menu found in this template. Here is a link to the template: (I have purchased the code but I am specifically looking into getting the user-menu feature to work correctly.) On mobile devices, when you click the button, it should display a dropdown menu, but for some reason, it's not working as expected. I've been stuck on this issue for quite some time now and would appreciate any advice or suggestions on how to improve my code overall.
Here is an example of the markup used, assuming standard less/css for Bootstrap 3:
<header class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-header">
<button type="button" class="navbar-toggle pull-left" data-toggle="offcanvas" data-target=".sidemenu-offcanvas" id="nav-toggle">
<span class="sr-only">Toggle navigation</span>
<i class="icon-reorder" style="color: white;"></i>
</button>
<a class="navbar-brand" href="#">
<img src="assets/images/logos/logo.png" alt="GEC Logo">
</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".profile-collapse">
<span class="sr-only">Toggle user menu</span>
<i class="icon-user" style="color: white;"></i>
</button>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".search-collapse">
<span class="sr-only">Toggle search</span>
<i class="icon-search" style="color: white;"></i>
</button>
</div>
<div class="collapse navbar-collapse profile-collapse navbar-right">
<ul class="nav navbar-nav">
<li class="dropdown ">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="#" alt="John Smith">
John Smith <i class="caret"></i>
<span class="badge badge-red">5</span>
</a>
<ul class="dropdown-menu">
<li class="with-image">
<div class="avatar">
<img src="assets/images/avatar.png" />
</div>
<span>John Smith</span>
</li>
<li class="divider"></li>
<li>
<a href="#/">
<i class="icon-user"></i>
<span>Profile</span>
</a>
</li>
<li>
<a href="#/">
<i class="icon-envelope"></i>
<span>Messages</span>
<span class="label label-red pull-right">5</span>
</a>
</li>
<li>
<a href="#/">
<i class="icon-cog"></i>
<span>Settings</span>
</a>
</li>
<li>
<a href="#/">
<i class="icon-off"></i>
<span>Logout</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="collapse navbar-collapse search-collapse navbar-right">
<form class="navbar-form" action="" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
</form>
</div>
</header>