File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -22,29 +22,32 @@ const app = new Vue({
2222} ) ;
2323
2424
25- require ( './bulma-extensions' ) ;
26-
25+ // Bulma NavBar Burger Script
2726document . addEventListener ( 'DOMContentLoaded' , function ( ) {
2827 // Get all "navbar-burger" elements
2928 const $navbarBurgers = Array . prototype . slice . call ( document . querySelectorAll ( '.navbar-burger' ) , 0 ) ;
30-
29+
3130 // Check if there are any navbar burgers
3231 if ( $navbarBurgers . length > 0 ) {
33-
32+
3433 // Add a click event on each of them
3534 $navbarBurgers . forEach ( function ( $el ) {
3635 $el . addEventListener ( 'click' , function ( ) {
37-
36+
3837 // Get the target from the "data-target" attribute
3938 let target = $el . dataset . target ;
4039 let $target = document . getElementById ( target ) ;
41-
40+
4241 // Toggle the class on both the "navbar-burger" and the "navbar-menu"
4342 $el . classList . toggle ( 'is-active' ) ;
4443 $target . classList . toggle ( 'is-active' ) ;
45-
44+
4645 } ) ;
4746 } ) ;
4847 }
49-
48+
5049} ) ;
50+
51+
52+
53+ require ( './bulma-extensions' ) ;
You can’t perform that action at this time.
0 commit comments