From acede30f96ec9b883bf60797504d06331322b08b Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 28 Aug 2018 10:03:28 -0400 Subject: [PATCH] adding element checking for the booking widget before trying to add the class --- functions.php | 4 ++-- rooms.php | 4 +++- style.css | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) 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"); + } });