Answer the question
In order to leave comments, you need to log in
Why doesn't collapse open if you click on it while the page is loading?
Hello. Here's the thing, there is a menu made through collapse. But the trouble is that if, when loading the page, quickly click on the icon without waiting for the full load, the menu will not open, and if you wait after that the page is fully loaded, no matter how much you click on the menu, it will no longer open.
If you do not press at the time of loading, then everything works fine.
here is the call button
<script>
$('.navbar-logo').on('click', function () {
$(".collapse-menu-logo").collapse('show');
$('#navbarSearch').each(function(){
$(this).collapse('hide');
});
});
</script>
<button class="navbar-logo" data-toggle="collapse" data-target="#navbar-logo" aria-expanded="false">
<div class="field_width_menu"></div>
<div class="field_width_menu"></div>
<div class="field_width_menu"></div>
</button>
<div class="collapse collapse-menu-head" id="navbarToggleExternalContent">
<div class="col-sm-2 col-xs-2">
....
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question