fixing js play issue by adding it to the is_front page check in the theme
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 29 May 2019 14:05:54 +0000 (10:05 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 29 May 2019 14:05:54 +0000 (10:05 -0400)
includes/avada-functions.php

index 8ed681f..5d0e087 100644 (file)
@@ -1047,8 +1047,7 @@ if ( ! function_exists( 'avada_sliders_container' ) ) {
                             </video>
                         </div>
                     </div>
-                <?php endif; ?>
-                <script>
+                    <script>
                     jQuery(window).on("load", function(){
                         
                         // if( jQuery(window).width() < 1025) {
@@ -1077,6 +1076,8 @@ if ( ! function_exists( 'avada_sliders_container' ) ) {
                         height: auto;
                     }
                 </style>
+                <?php endif; ?>
+
                 <?php
                                if ( ( ! is_home() && ! is_front_page() && ! is_archive() && isset( $queried_object_id ) ) || ( ! is_home() && is_front_page() && isset( $queried_object_id ) ) ) {
                                        $slider_page_id = $queried_object_id;