fixing off canvas toggle for desktop view
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 30 Aug 2018 20:07:58 +0000 (16:07 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 30 Aug 2018 20:07:58 +0000 (16:07 -0400)
functions.php
header.php
js/app.js
js/custom/pageSetup.js
style.css

index 413739d..b1122b5 100644 (file)
@@ -86,7 +86,7 @@ function glm_site_scripts()
         'glm_foundation',
         get_template_directory_uri() . '/js/app.js',
         'jquery',
-        '1.0.52',
+        '1.0.53',
         true
     );
     
index 34527cb..9705c96 100644 (file)
@@ -4,7 +4,7 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title><?php wp_title(); ?></title>
-    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=1.0.52">
+    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=1.0.53">
     <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri() ; ?>/favicon.ico?v=2">
 <!--
     <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700' rel='stylesheet' type='text/css'>
index 4bca222..1e0b641 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -15,6 +15,7 @@ $(document).ready(function () {
         $(this).before('<a class="toggle" href="#"></a>');
     });
 
+
     $('a.toggle').on("click", function (e) {
         // $(this).toggleClass('open');
         // $(this).siblings('ul').toggleClass('open');
@@ -28,12 +29,12 @@ $(document).ready(function () {
         }
 
     });
-  
-    if(window.glmData.location){
-        $('a.toggle').trigger("click");
-        $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right');
+    if( $(window).width() < 1024){
+        if(window.glmData.location){
+            $('a.toggle').trigger("click");
+            $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right');
+        }
     }
-
     $('.left-off-canvas-list').find('.menu-item-has-children > a:not(.toggle)').on("click", function(e){
     
         e.preventDefault();
index df06d6d..3a5a627 100644 (file)
@@ -6,6 +6,7 @@ $(document).ready(function () {
         $(this).before('<a class="toggle" href="#"></a>');
     });
 
+
     $('a.toggle').on("click", function (e) {
         // $(this).toggleClass('open');
         // $(this).siblings('ul').toggleClass('open');
@@ -19,12 +20,12 @@ $(document).ready(function () {
         }
 
     });
-  
-    if(window.glmData.location){
-        $('a.toggle').trigger("click");
-        $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right');
+    if( $(window).width() < 1024){
+        if(window.glmData.location){
+            $('a.toggle').trigger("click");
+            $('.off-canvas-wrap').foundation('offcanvas', 'show', 'move-right');
+        }
     }
-
     $('.left-off-canvas-list').find('.menu-item-has-children > a:not(.toggle)').on("click", function(e){
     
         e.preventDefault();
index e4fffeb..3171dab 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: Staffords
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme for Staffords
-Version: 1.0.52
+Version: 1.0.53
 */