From 3f1cdcb77b70ae4b9927711e5e1d6d48d85b61a6 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 23 Mar 2017 13:44:06 -0400 Subject: [PATCH] adding buy tickets menu back to off canvas --- js/app.js | 7 ++++++- js/custom/pageSetup.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 168b63d..5171638 100644 --- a/js/app.js +++ b/js/app.js @@ -65,17 +65,20 @@ $(document).ready(function () { total = adult_total; ticket_total.text("$" + total); }); + kids.on('change', function(){ var kid_total = 0; kid_total = parseInt($(this).val()) * 13; total += kid_total; ticket_total.text("$" + total); }); + kids_5.on('change', function(){ var kid_5_total = parseInt($(this).val()) * 0; total = kid_5_total; ticket_total.text("$" + total); }); + bikes.on('change', function(){ var bike_total = parseInt($(this).val()) * 10; total = bike_total; @@ -87,13 +90,15 @@ $(document).ready(function () { var address = $(this).children('.address_1_street').text().replace(/ /g,'') + $(this).children(".address_1_region").text().replace(/ /g,''); window.open('https://maps.google.com/?q=' + address, '_blank'); }); + address_2.on("click", function(){ var address = $(this).children('.address_2_street').text().replace(/ /g,'') + $(this).children(".address_2_region").text().replace(/ /g,''); window.open('https://maps.google.com/?q=' + address, '_blank'); }); + oc_menu_items.each(function(index, value) { var title = $(this).children('a').text(); - if( title === 'Buy Tickets' || title === 'Schedules'){ + if( title === 'Schedules'){ $(this).remove(); } }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index db76632..4f7d9dc 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -54,17 +54,20 @@ $(document).ready(function () { total = adult_total; ticket_total.text("$" + total); }); + kids.on('change', function(){ var kid_total = 0; kid_total = parseInt($(this).val()) * 13; total += kid_total; ticket_total.text("$" + total); }); + kids_5.on('change', function(){ var kid_5_total = parseInt($(this).val()) * 0; total = kid_5_total; ticket_total.text("$" + total); }); + bikes.on('change', function(){ var bike_total = parseInt($(this).val()) * 10; total = bike_total; @@ -76,13 +79,15 @@ $(document).ready(function () { var address = $(this).children('.address_1_street').text().replace(/ /g,'') + $(this).children(".address_1_region").text().replace(/ /g,''); window.open('https://maps.google.com/?q=' + address, '_blank'); }); + address_2.on("click", function(){ var address = $(this).children('.address_2_street').text().replace(/ /g,'') + $(this).children(".address_2_region").text().replace(/ /g,''); window.open('https://maps.google.com/?q=' + address, '_blank'); }); + oc_menu_items.each(function(index, value) { var title = $(this).children('a').text(); - if( title === 'Buy Tickets' || title === 'Schedules'){ + if( title === 'Schedules'){ $(this).remove(); } }); -- 2.17.1