Added console test statements to discover jquery error in footer on certain systems
authorLaury GvR <laury@gaslightmedia.com>
Tue, 28 Aug 2018 19:17:11 +0000 (15:17 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 28 Aug 2018 19:17:11 +0000 (15:17 -0400)
functions.php
js/app.js
js/custom/pageSetup.js

index c410b5e..e5a9748 100644 (file)
@@ -165,9 +165,9 @@ function glm_site_scripts()
     wp_enqueue_script('jquery');
     wp_enqueue_script(
         'glm_foundation',
-        get_template_directory_uri() . '/js/app.js?v=1.0.19',
+        get_template_directory_uri() . '/js/app.js',
         'jquery',
-        '1.0.9',
+        '1.0.19.0',
         true
     );
     if(is_front_page()) {
index 7f42a9c..a320851 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -50,11 +50,18 @@ $(document).ready(function () {
         })
         $('.manufacturer-brand').each(function(){
             let url = $(this).children('a').attr('href');
+            console.log($(this));
+            console.log("Length of children:");
+            console.log($(this).children('ul').length);
             if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){
+                
+                console.log("Has children");
                 // $(this).attr('data-url', url);
                 $(this).on("click", function(){
                     window.location = url;
                 })
+            } else {
+                console.log("Has no children");
             }
         })
     }
index 95ef1af..8c7fcca 100644 (file)
@@ -41,11 +41,18 @@ $(document).ready(function () {
         })
         $('.manufacturer-brand').each(function(){
             let url = $(this).children('a').attr('href');
+            console.log($(this));
+            console.log("Length of children:");
+            console.log($(this).children('ul').length);
             if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){
+                
+                console.log("Has children");
                 // $(this).attr('data-url', url);
                 $(this).on("click", function(){
                     window.location = url;
                 })
+            } else {
+                console.log("Has no children");
             }
         })
     }