Minor fix to previous commit. Also bump app.js version
authorLaury GvR <laury@gaslightmedia.com>
Fri, 1 Dec 2017 18:41:48 +0000 (13:41 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 1 Dec 2017 18:41:48 +0000 (13:41 -0500)
functions.php
js/app.js
js/custom/pageSetup.js

index 2460b24..3ffd5a8 100644 (file)
@@ -104,7 +104,7 @@ function glm_site_scripts()
     wp_enqueue_script('jquery');
     wp_enqueue_script(
         'glm_foundation',
-        get_template_directory_uri() . '/js/app.js?v=1.0.48',
+        get_template_directory_uri() . '/js/app.js?v=1.0.50',
         'jquery',
         '1.0',
         true
index a473ea0..2472564 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -319,7 +319,7 @@ $(document).ready(function () {
     var video_container_desktop = document.getElementById( "front-page-video-container-desktop" );
     var video_mobile            = document.getElementById( "front-page-video-container-mobile-video" );
     var video_desktop           = document.getElementById( "front-page-video-container-desktop-video" );
-    if ( $("#front-page-video-container-desktop").length > 0 || $("#front-page-video-container-mobile") ) { 
+    if ( $("#front-page-video-container-desktop").length > 0 || $("#front-page-video-container-mobile").length > 0 ) { 
         if( $(window).width() >= 640){
             video_wrapper.removeChild(video_container_mobile);
         } else {
@@ -336,7 +336,7 @@ $(document).ready(function () {
                     video_desktop.play();
                 }
             } else {
-                if ( video_container_desktop.length && !document.getElementById( "front-page-video-container-mobile" )) {
+                if ( !document.getElementById( "front-page-video-container-mobile" )) {
                     video_wrapper.appendChild(video_container_mobile);
                     video_wrapper.removeChild(video_container_desktop);
                     video_mobile = document.getElementById( "front-page-video-container-mobile-video" );
index f8cb983..c1b8c8b 100644 (file)
@@ -310,7 +310,7 @@ $(document).ready(function () {
     var video_container_desktop = document.getElementById( "front-page-video-container-desktop" );
     var video_mobile            = document.getElementById( "front-page-video-container-mobile-video" );
     var video_desktop           = document.getElementById( "front-page-video-container-desktop-video" );
-    if ( $("#front-page-video-container-desktop").length > 0 || $("#front-page-video-container-mobile") ) { 
+    if ( $("#front-page-video-container-desktop").length > 0 || $("#front-page-video-container-mobile").length > 0 ) { 
         if( $(window).width() >= 640){
             video_wrapper.removeChild(video_container_mobile);
         } else {
@@ -327,7 +327,7 @@ $(document).ready(function () {
                     video_desktop.play();
                 }
             } else {
-                if ( video_container_desktop.length && !document.getElementById( "front-page-video-container-mobile" )) {
+                if ( !document.getElementById( "front-page-video-container-mobile" )) {
                     video_wrapper.appendChild(video_container_mobile);
                     video_wrapper.removeChild(video_container_desktop);
                     video_mobile = document.getElementById( "front-page-video-container-mobile-video" );