From 341bde3dfa2de19fe8070a646b0e759dc8358113 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 9 Nov 2015 13:28:35 -0500 Subject: [PATCH] added classes to datepickers so offcanvas share the event delegation --- js/app.js | 12 +++++------ js/custom/pageSetup.js | 12 +++++------ parts/reservation-form-off-canvas.php | 31 +++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/js/app.js b/js/app.js index f1d7c1d..21b1391 100644 --- a/js/app.js +++ b/js/app.js @@ -39,12 +39,12 @@ $(document).ready(function () { }); //////////////////////////////////////////////////////// - $("#arrive").datepicker(); - $("#depart").datepicker(); - $("#arriveCal").click(function () { - $("#arrive").datepicker("show"); + $(".arrive").datepicker(); + $(".depart").datepicker(); + $(".arriveCal").click(function () { + $(".arrive").datepicker("show"); }); - $("#departCal").click(function () { - $("#depart").datepicker("show"); + $(".departCal").click(function () { + $(".depart").datepicker("show"); }); }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 23e8801..9a3ba1e 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -30,12 +30,12 @@ $(document).ready(function () { }); //////////////////////////////////////////////////////// - $("#arrive").datepicker(); - $("#depart").datepicker(); - $("#arriveCal").click(function () { - $("#arrive").datepicker("show"); + $(".arrive").datepicker(); + $(".depart").datepicker(); + $(".arriveCal").click(function () { + $(".arrive").datepicker("show"); }); - $("#departCal").click(function () { - $("#depart").datepicker("show"); + $(".departCal").click(function () { + $(".depart").datepicker("show"); }); }); diff --git a/parts/reservation-form-off-canvas.php b/parts/reservation-form-off-canvas.php index 1b667c7..9d0e932 100644 --- a/parts/reservation-form-off-canvas.php +++ b/parts/reservation-form-off-canvas.php @@ -9,19 +9,42 @@
- +
- +
- +
- +
-- 2.17.1