My website utilizes a bootstrap feature for mobile devices where a left sidebar pops up when clicking a button. I am not very familiar with bootstrap, but I would like to link a javascript event to determine if the left sidebar is visible. How can I achieve this in javascript? I want to use the change() function, but I am unsure how the bootstrap js actually displays the menu bar... The HTML for the button is:
<div class="navbar navbar-inverse navbar-fixed-top" style="padding-left:6px;">
<button type="button" class="navbar-toggle pull-left" data-toggle="offcanvas" data-recalc="true" data-target=".navmenu" data-canvas=".canvas">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
The HTML for the left sidebar is:
<div class="navmenu navmenu-inverse navmenu-fixed-left" id="mobile_navbar">
<a class="navmenu-brand" href="/">Benty-fields</a>
<ul class="nav navmenu-nav">
content
</div>