From: Steve Sutton Date: Fri, 20 Jul 2018 12:04:17 +0000 (-0400) Subject: Update js again X-Git-Tag: v1.0.45^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=df609f6efe688e546dacf6633745eb8d4397f31f;p=WP-Themes%2Fstaffords.git Update js again for offcanvas need text() and remove Stafford's text from match --- diff --git a/js/app.js b/js/app.js index ecf19a1..6bbff5a 100644 --- a/js/app.js +++ b/js/app.js @@ -148,13 +148,13 @@ $(document).ready(function () { $('.res-buttonOff').on('click', function () { adults = "adults=" + $("#adultsOff").val() + "&"; kids = "children=" + $("#kidsOff").val(); - if ($('#propertyNameOff option:selected').val() === "Stafford's Bay View Inn") { + if ($('#propertyNameOff option:selected').text() === "Bay View Inn") { window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + bayView + start + stay + adults + kids); - } else if ($('#propertyNameOff option:selected').val() === "Stafford's Crooked River Lodge") { + } else if ($('#propertyNameOff option:selected').text() === "Crooked River Lodge") { window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + crookedRiver + start + stay + adults + kids); - } else if ($('#propertyNameOff option:selected').val() === "Stafford's Perry Hotel") { + } else if ($('#propertyNameOff option:selected').text() === "Perry Hotel") { window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + perry + start + stay + adults + kids); - } else if ($('#propertyName option:selected').val() === "Property") { + } else if ($('#propertyName option:selected').text() === "Property") { alert("Please Select a Property"); } }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index d2192d0..33467bf 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -139,13 +139,13 @@ $(document).ready(function () { $('.res-buttonOff').on('click', function () { adults = "adults=" + $("#adultsOff").val() + "&"; kids = "children=" + $("#kidsOff").val(); - if ($('#propertyNameOff option:selected').val() === "Stafford's Bay View Inn") { + if ($('#propertyNameOff option:selected').text() === "Bay View Inn") { window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + bayView + start + stay + adults + kids); - } else if ($('#propertyNameOff option:selected').val() === "Stafford's Crooked River Lodge") { + } else if ($('#propertyNameOff option:selected').text() === "Crooked River Lodge") { window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + crookedRiver + start + stay + adults + kids); - } else if ($('#propertyNameOff option:selected').val() === "Stafford's Perry Hotel") { + } else if ($('#propertyNameOff option:selected').text() === "Perry Hotel") { window.open("https://www.bookonthenet.net/east/premium/eresmain.aspx?id=" + perry + start + stay + adults + kids); - } else if ($('#propertyName option:selected').val() === "Property") { + } else if ($('#propertyName option:selected').text() === "Property") { alert("Please Select a Property"); } });