From: Anthony Talarico Date: Tue, 8 Oct 2019 15:30:17 +0000 (-0400) Subject: fixing reservation widget issues between mobile and pc view X-Git-Tag: v1.1.0^2~53 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=fc4bfc20b3f5b0a916c8e1a42ee56ca0f4bdcc7d;p=WP-Themes%2Fpetoskeyarea.git fixing reservation widget issues between mobile and pc view --- diff --git a/js/app.js b/js/app.js index 9efed5f..ca3bd4c 100644 --- a/js/app.js +++ b/js/app.js @@ -114,6 +114,15 @@ $(document).ready(function () { }); + if( $(window).width() < 1025 ){ + $("#mobile-sticky-nav").addClass("show"); + $("#room-rates-slider").fadeIn(); + $("#resContent").appendTo("#room-rates-slider"); + }else{ + $("#resContent").appendTo("#reservationContent"); + } + $("#resContent").fadeIn(); + var view_btn = $(".glm-block.view-all"); var btn_text_length, btn_text; @@ -123,6 +132,7 @@ $(document).ready(function () { $(".feed").slick('unslick') } if($(window).width() > 1023){ + $("#resContent").appendTo("#reservationContent"); $("#mobile-sticky-nav").remove("show"); $(".feed").slick({ infinite: true, @@ -131,15 +141,16 @@ $(document).ready(function () { }); }else if($(window).width() < 641 ){ $("#mobile-sticky-nav").addClass("show"); - + $("#resContent").appendTo("#room-rates-slider"); } else if($(window).width() < 1025 && $(window).width() > 639){ - + $("#resContent").appendTo("#room-rates-slider"); $(".feed").slick({ infinite: true, slidesToShow: 2, slidesToScroll: 1 }); } else if($(window).width() < 641 && $(window).width() > 319){ + $("#resContent").appendTo("#room-rates-slider"); $(".feed").slick({ infinite: true, slidesToShow: 1, @@ -398,13 +409,6 @@ $(document).ready(function () { $("#room-rates-slider").toggleClass("open-form"); }) - if( $(window).width() < 1025 ){ - $("#mobile-sticky-nav").addClass("show"); - $("#room-rates-slider").fadeIn(); - $("#resContent").appendTo("#room-rates-slider"); - }else{ - $("#resContent").appendTo("#reservationContent"); - } - $("#resContent").fadeIn(); + }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 576624c..e3c8167 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -105,6 +105,15 @@ $(document).ready(function () { }); + if( $(window).width() < 1025 ){ + $("#mobile-sticky-nav").addClass("show"); + $("#room-rates-slider").fadeIn(); + $("#resContent").appendTo("#room-rates-slider"); + }else{ + $("#resContent").appendTo("#reservationContent"); + } + $("#resContent").fadeIn(); + var view_btn = $(".glm-block.view-all"); var btn_text_length, btn_text; @@ -114,6 +123,7 @@ $(document).ready(function () { $(".feed").slick('unslick') } if($(window).width() > 1023){ + $("#resContent").appendTo("#reservationContent"); $("#mobile-sticky-nav").remove("show"); $(".feed").slick({ infinite: true, @@ -122,15 +132,16 @@ $(document).ready(function () { }); }else if($(window).width() < 641 ){ $("#mobile-sticky-nav").addClass("show"); - + $("#resContent").appendTo("#room-rates-slider"); } else if($(window).width() < 1025 && $(window).width() > 639){ - + $("#resContent").appendTo("#room-rates-slider"); $(".feed").slick({ infinite: true, slidesToShow: 2, slidesToScroll: 1 }); } else if($(window).width() < 641 && $(window).width() > 319){ + $("#resContent").appendTo("#room-rates-slider"); $(".feed").slick({ infinite: true, slidesToShow: 1, @@ -389,13 +400,6 @@ $(document).ready(function () { $("#room-rates-slider").toggleClass("open-form"); }) - if( $(window).width() < 1025 ){ - $("#mobile-sticky-nav").addClass("show"); - $("#room-rates-slider").fadeIn(); - $("#resContent").appendTo("#room-rates-slider"); - }else{ - $("#resContent").appendTo("#reservationContent"); - } - $("#resContent").fadeIn(); + });