From: Anthony Talarico Date: Thu, 23 Mar 2017 17:44:06 +0000 (-0400) Subject: adding buy tickets menu back to off canvas X-Git-Tag: v1.0.0^2~62 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3f1cdcb77b70ae4b9927711e5e1d6d48d85b61a6;p=WP-Themes%2Fmackinawferry.git adding buy tickets menu back to off canvas --- 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(); } });