From: Anthony Talarico Date: Tue, 28 Aug 2018 14:03:28 +0000 (-0400) Subject: adding element checking for the booking widget before trying to add the class X-Git-Tag: v1.0.3^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=acede30f96ec9b883bf60797504d06331322b08b;p=WP-Themes%2Flaurium.git adding element checking for the booking widget before trying to add the class --- diff --git a/functions.php b/functions.php index d5843fd..5a53c4e 100644 --- a/functions.php +++ b/functions.php @@ -198,8 +198,8 @@ function accesspress_parallax_scripts() { wp_enqueue_script( 'accesspress-parallax-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0', true ); wp_localize_script( 'accesspress-parallax-custom', 'ap_params', $slider_parameters ); - wp_enqueue_script( 'glm-dev', get_template_directory_uri() . '/assets/js/glm-dev.js', array(), '1.0.2', true ); - wp_enqueue_style( 'glm-style', get_template_directory_uri() . '/assets/css/glm-dev.css', false, "1.0.2" ); + wp_enqueue_script( 'glm-dev', get_template_directory_uri() . '/assets/js/glm-dev.js', array(), '1.0.3', true ); + wp_enqueue_style( 'glm-style', get_template_directory_uri() . '/assets/css/glm-dev.css', false, "1.0.3" ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); diff --git a/rooms.php b/rooms.php index 3ffb94e..08a0dcc 100644 --- a/rooms.php +++ b/rooms.php @@ -128,7 +128,9 @@ get_header(); jQuery( "#rooms-tabs" ).tabs({ active: tab }); - $("[id^='bookWidget']").addClass("small-12 medium-9 large-6 grid-columns booking-widget") + if( $("[id^='bookWidget']") ){ + $("[id^='bookWidget']").addClass("small-12 medium-9 large-6 grid-columns booking-widget"); + } });