From: Laury GvR Date: Tue, 28 Aug 2018 19:17:11 +0000 (-0400) Subject: Added console test statements to discover jquery error in footer on certain systems X-Git-Tag: v1.0.20^2~10 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=c02146eaff60c80d15f1d799a71fe05fc5199c2e;p=WP-Themes%2Fbrewbakers.git Added console test statements to discover jquery error in footer on certain systems --- diff --git a/functions.php b/functions.php index c410b5e..e5a9748 100644 --- a/functions.php +++ b/functions.php @@ -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()) { diff --git a/js/app.js b/js/app.js index 7f42a9c..a320851 100644 --- 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"); } }) } diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 95ef1af..8c7fcca 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -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"); } }) }