Skip to content

Commit

Permalink
fix(menu): re-activate boostrap-ative collapse after defer ready
Browse files Browse the repository at this point in the history
  • Loading branch information
vogloblinsky committed Oct 16, 2018
1 parent c1b940b commit 77b24cd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/resources/js/menu.js
Expand Up @@ -122,6 +122,17 @@ document.addEventListener('DOMContentLoaded', function() {
menuCollapsed = !menuCollapsed;
});

/**
* Native bootstrap doesn't wait DOMContentLoaded event to start his job, re do it here
*/
var Collapses = document.querySelectorAll('[data-toggle="collapse"]');
for (var o = 0, cll = Collapses.length; o < cll; o++) {
var collapse = Collapses[o],
options = {};
options.duration = collapse.getAttribute('data-duration');
new Collapse(collapse, options);
}

// collapse menu
var classnameMenuToggler = document.getElementsByClassName('menu-toggler'),
faAngleUpClass = 'ion-ios-arrow-up',
Expand Down

0 comments on commit 77b24cd

Please sign in to comment.