windhamdavid 5 years ago
parent
commit
2928b00c01
4 changed files with 2146 additions and 4 deletions
  1. 2 4
      .jshintrc
  2. 2114 0
      js/bootstrap.js
  3. 2 0
      js/script.min.js
  4. 28 0
      js/scripts.js

+ 2 - 4
.jshintrc

@@ -1,6 +1,6 @@
 {
 	"boss": true,
-	"curly": true,
+	"curly": false,
 	"eqeqeq": true,
 	"eqnull": true,
 	"es3": true,
@@ -12,13 +12,11 @@
 	"trailing": true,
 	"undef": true,
 	"unused": true,
-
 	"browser": true,
 
 	"globals": {
 		"_": false,
 		"Backbone": false,
-		"jQuery": false,
-		"wp": false
+		"jQuery": true
 	}
 }

File diff suppressed because it is too large
+ 2114 - 0
js/bootstrap.js


File diff suppressed because it is too large
+ 2 - 0
js/script.min.js


+ 28 - 0
js/scripts.js

@@ -0,0 +1,28 @@
+( function( $ ) {
+	
+ $( '#toggle-menu' ).on( 'touchstart click', function(e) {
+  e.preventDefault();
+
+  var $body = $( 'body' ),
+      $page = $( '#page' ),
+      $menu = $( '#menu' ),
+
+      transitionEnd = 'transitionend webkitTransitionEnd otransitionend MSTransitionEnd';
+
+  $body.addClass( 'animating' );
+
+  if ( $body.hasClass( 'menu-visible' ) ) {
+   $body.addClass( 'right' );
+  } else {
+   $body.addClass( 'left' );
+  }
+  
+  $page.on( transitionEnd, function() {
+   $body
+    .removeClass( 'animating left right' )
+    .toggleClass( 'menu-visible' );
+
+   $page.off( transitionEnd );
+  } );
+ } );
+} )( jQuery );