Browse Source

Fixed burger AGAIN

Adèle 9 years ago
parent
commit
49d23af408
1 changed files with 12 additions and 11 deletions
  1. 12 11
      theme/static/scripts/mine.js

+ 12 - 11
theme/static/scripts/mine.js

@@ -3,11 +3,21 @@ var hash = window.location.hash;
 
 window.location.hash = ''; // avoid going to anchor
 
-
 $window.on('load', function() {
+
   var content = $('#content');
   var size = 24; // magic number !
 
+  $('.burger').on('click',function(){
+    $('#banner nav').toggleClass('opened');
+    $('.cacheMenu').fadeToggle();
+  });
+
+  $('.cacheMenu').on('click',function(){
+    $('#banner nav').toggleClass('opened');
+    $('.cacheMenu').fadeToggle();
+  });
+
   // nav is not displayed on small screens so no need to continue
   if (window.matchMedia('(max-width: 40rem)').matches) {
     return;
@@ -67,14 +77,5 @@ $window.on('load', function() {
     );
   }
 
-  $('.burger').on('click',function(){
-    $('#banner nav').toggleClass('opened');
-    $('.cacheMenu').fadeToggle();
-  });
-
-  $('.cacheMenu').on('click',function(){
-    $('#banner nav').toggleClass('opened');
-    $('.cacheMenu').fadeToggle();
-  });
-
 });
+