Foxton Beach (2024)

' + category + '

' + location + '

' + post_title + '';var divContent2 = '

' + hoursContent + phoneContent + emailContent + addressContent + '

';var divContent3 = '

Foxton Beach (1) Remove

+ Add to your trip

';jQuery("#" + per).append(divContent + divContent2 + divContent3);// Add data to popup// var htmlData = '';// htmlData += '

';// htmlData += '

';// htmlData += '

';// htmlData += ' Foxton Beach (2)';// htmlData += '

';// htmlData += '

';// htmlData += '

';// htmlData += '

';// htmlData += '

'+category+'
';// htmlData += ' '+post_title+'>';// htmlData += '

';// htmlData += '

';// htmlData += '

';// htmlData += '

';// htmlData += '

';// htmlData += '

    ';// htmlData += '
  • ';// htmlData += ' ';// htmlData += '
  • ';// htmlData += '
  • Remove
  • ';// htmlData += '
  • ';// htmlData += ' ';// htmlData += '
  • ';// htmlData += '

';// htmlData += '

';// htmlData += '

';// htmlData += '

';// jQuery("#mytriplist").append(htmlData);popupDataCall();jQuery("#" + per + ' .period-box').remove();}if (countTrip() > 0) {if (jQuery("#countTrip").length == 0) {jQuery('#mm-mytrip-link').append('' + countTrip() + '');} else {jQuery("#countTrip").css('display', 'block');document.getElementById("countTrip").textContent = countTrip();}} else {jQuery("#countTrip").css('display', 'none');}if (count < 2) {jQuery("#" + per).append('');}} else {}},error: function(request, error) {console.log(error)}});}var dateToday = new Date();const tomorrow = new Date(dateToday)tomorrow.setDate(tomorrow.getDate() + 1)jQuery("#datepicker").datepicker({onSelect: function(dateText) {updateDateTime(this.value);},minDate: dateToday}).datepicker("setDate", new Date());jQuery("#datepickernextday").datepicker({onSelect: function(dateText) {updateDateTimeNextDay(this.value);},minDate: dateToday}).datepicker("setDate", new Date());//setDateBtn //selectDayModalInputjQuery("#setDateBtn").click(function() {var dateval = jQuery("#selectDayModalInput").val();if (dateval == '') {updateDateTimeNextDay(new Date());}});jQuery("#currentdayradio").click(function() {// console.log('currentdayradio')var activeDay = jQuery("#selectedDay").val()const yesterday = new Date(activeDay)yesterday.setDate(yesterday.getDate() - 1)var shortdate = (new Date(yesterday)).toLocaleDateString('en');jQuery("#selectedDay").val(shortdate)jQuery("#currentdayradio").val(shortdate);const d = new Date(yesterday);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);jQuery("#arrowlefticon").css('display', 'flex');jQuery("#arrowrighticon").css('display', 'flex');//jQuery("#itinarycontent-nextday").css('display', 'flex');// jQuery("#itinarycontent").hide();getLocalStorageValues();});jQuery("#nextdayradio").click(function() {// console.log('nextdayradio')var activeDay = jQuery("#selectedDay").val()// console.log(activeDay)const tomorrow = new Date(activeDay)tomorrow.setDate(tomorrow.getDate() + 1)var shortdate = (new Date(tomorrow)).toLocaleDateString('en');jQuery("#selectedDay").val(shortdate)jQuery("#currentdayradio").val(shortdate);const d = new Date(tomorrow);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);jQuery("#arrowlefticon").css('display', 'flex');jQuery("#arrowrighticon").css('display', 'flex');//jQuery("#itinarycontent-nextday").css('display', 'flex');// jQuery("#itinarycontent").hide();getLocalStorageValues();});jQuery("body").on('click', '#nextDay2Container', function() {// console.log('nextdaybutton')// jQuery("#nextDay2Container").click(function () {var activeDay = jQuery("#selectedDay").val()const tomorrow = new Date(activeDay)tomorrow.setDate(tomorrow.getDate() + 1)var shortdate = (new Date(tomorrow)).toLocaleDateString('en');jQuery("#selectedDay").val(shortdate)jQuery("#currentdayradio").val(shortdate);const d = new Date(tomorrow);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);jQuery("#arrowlefticon").css('display', 'flex');jQuery("#arrowrighticon").css('display', 'flex');//jQuery("#itinarycontent-nextday").css('display', 'flex');// jQuery("#itinarycontent").hide();getLocalStorageValues();});jQuery("body").on('click', '#arrowlefticon', function() {//jQuery("#arrowlefticon").click(function () {var activeDay = jQuery("#selectedDay").val()const yesterday = new Date(activeDay)var shortdate = (new Date(tomorrow)).toLocaleDateString('en');yesterday.setDate(yesterday.getDate() - 1)var shortdate = (new Date(yesterday)).toLocaleDateString('en');jQuery("#selectedDay").val(shortdate);jQuery("#currentdayradio").val(shortdate);const d = new Date(yesterday);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);jQuery("#arrowlefticon").css('display', 'flex');getLocalStorageValues();});function updateDateTime(str) {const d = new Date(str);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);var shortdate = (new Date(str)).toLocaleDateString('en');jQuery("#selectedDay").val(shortdate);jQuery("#currentdayradio").val(shortdate);// jQuery("#selectedDay").val(str);localStorage.setItem("currentDay", day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);setItinaryDataLocal(str);jQuery("#arrowlefticon").css('display', 'flex');jQuery("#arrowrighticon").css('display', 'flex');getLocalStorageValues();jQuery("#showDatePickerDivContainer").hide();jQuery("#showRadioDivContainer").css('display', 'flex');}function updateDateTimeNextDay(str) {const d = new Date(str);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#selectDayModalInput").val(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);localStorage.setItem("currentDay", day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);}function getDayName(dateStr, locale) {var date = dateStr;return date.toLocaleDateString(locale, {weekday: 'short'});}function getIndexOfDay(arrayJS, date) {var indexval;for (let i in arrayJS) {let dateDate = arrayJS[i]const keys = Object.keys(dateDate);if (keys[0] == date) {indexval = i;}}return indexval;}function storeValue2Local(id, table) {// console.log(table)// console.log(jQuery('#addtripmodalinput').val())var activedate = jQuery("#selectedDay").val();if (typeof activedate == 'undefined') {activedate = jQuery('#addtripmodalinput').val();}if (typeof activedate == 'undefined') {activedate = jQuery('#eventstart').val();}// console.log(activedate)if (activedate == '') {const d = new Date();var shortdate = (new Date()).toLocaleDateString('en');jQuery("#selectedDay").val(shortdate);jQuery("#currentdayradio").val(shortdate);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);jQuery("#arrowlefticon").css('display', 'flex');jQuery("#arrowrighticon").css('display', 'flex');} else {var shortdate = (new Date(activedate)).toLocaleDateString('en');}var array = localStorage.getItem('itinaryData');var arrayJS = JSON.parse(array) || [];console.log("dat123e: ");console.log(shortdate);if (JSON.stringify(arrayJS).indexOf([shortdate]) > -1) {var indexval = getIndexOfDay(arrayJS, shortdate);if (table == 'morning') {// console.log('morningdata')arrayJS[indexval][shortdate].morning.push(id)localStorage.setItem('itinaryData', JSON.stringify(arrayJS));} else if (table == 'afternoon') {// console.log('afterdata')// console.log(indexval + ' ,'+shortdate + ' ,'+id)arrayJS[indexval][shortdate].afternoon.push(id)localStorage.setItem('itinaryData', JSON.stringify(arrayJS));} else {// console.log('eveningdata')arrayJS[indexval][shortdate].evening.push(id)localStorage.setItem('itinaryData', JSON.stringify(arrayJS));}} else {if (table == 'morning') {var newdaydata = {[shortdate]: {'morning': [id],'afternoon': [],'evening': []}};} else if (table == 'afternoon') {// console.log('afterdata')var newdaydata = {[shortdate]: {'morning': [],'afternoon': [id],'evening': []}};} else {// console.log('eveningdata')var newdaydata = {[shortdate]: {'morning': [],'afternoon': [],'evening': [id]}};}arrayJS.push(newdaydata);console.log("arrayJS", arrayJS);localStorage.setItem('itinaryData', JSON.stringify(arrayJS));}}function arrayRemove(arr, value) {return arr.filter(function(ele) {return ele != value;});}//pax405// Auto Select "See & Do" onload in the topItem on "Plan your trip" PagejQuery(document).ready(function(){var languages = [];// Toggle the checked state when the label is clickedfunction fetchRoute(routeId){ let driveRoute = routeId; instance = window.googleMap;// if (markers.length > 0) {// for (let i = 0; i < markers.length; i++) {// markers[i].setMap(null);// }// }if(window.directionsRenderer){ window.directionsRenderer.setMap(null); infowindow.close();} jQuery.ajax({type: 'POST',url: 'https://manawatunz.co.nz/wp-admin/admin-ajax.php',dataType: "json", // add data typedata: { 'page_id': driveRoute, action: 'get_drive_route_list'},success: function (data) {console.log(data); if(data== null) {console.log("Data not found");return; } var driveStart = data[0].route_address; var driveEnds = data[data.length-1].route_address; driveAddresses = []; data.map((e) => {driveAddresses.push({"location":e.route_address,"stopover":true})}) let RouteColor = 'blue';let RouteName = "";let customtravelmode;if(driveRoute == "247324"){RouteColor = "#ff0ff0";RouteName = "Manawatu Scenic";customtravelmode = google.maps.TravelMode.DRIVING;}if(driveRoute == "246918"){RouteColor = "#ff0000";RouteName = "Stormy Point";customtravelmode = google.maps.TravelMode.DRIVING;}if(driveRoute == "246950"){RouteColor = "#ffff00";RouteName = "Peep O Day";customtravelmode = google.maps.TravelMode.DRIVING;}if(driveRoute == "246905"){RouteColor = "#f0fff0";RouteName = "Cycleway";customtravelmode = google.maps.TravelMode.BICYCLING;}if(driveRoute == "246895"){RouteColor = "#ff21ff";RouteName = "Coastal Arts Trail";customtravelmode = google.maps.TravelMode.DRIVING;} RouteColor = "#00b0ff"; window.directionsService = new google.maps.DirectionsService(); window.directionsRenderer = new google.maps.DirectionsRenderer({ polylineOptions: { strokeColor: RouteColor},suppressMarkers: true, // hide markers for waypoints}); instance = window.googleMap; let markers = [];// window.directionsService = new google.maps.DirectionsService();// window.directionsRenderer = new google.maps.DirectionsRenderer(); window.directionsRenderer.setMap(instance.map); start = data[0].route_address; end = data[data.length-1].route_address; waypts = driveAddresses; window.directionsService .route({origin: start,destination:end,waypoints: waypts,//waypoints: [{"location":driveStart,"stopover":true},{"location":driveEnds,"stopover":true}],optimizeWaypoints: false,travelMode: customtravelmode }) .then((response) => { window.directionsRenderer.setDirections(response); const route = response.routes[0];// const svgMarker = {// path: "M10.453 14.016l6.563-6.609-1.406-1.406-5.156 5.203-2.063-2.109-1.406 1.406zM12 2.016q2.906 0 4.945 2.039t2.039 4.945q0 1.453-0.727 3.328t-1.758 3.516-2.039 3.070-1.711 2.273l-0.75 0.797q-0.281-0.328-0.75-0.867t-1.688-2.156-2.133-3.141-1.664-3.445-0.75-3.375q0-2.906 2.039-4.945t4.945-2.039z",// fillColor: "blue",// fillOpacity: 0.6,// strokeWeight: 0,// rotation: 0,// scale: 2,// anchor: new google.maps.Point(15, 30),// }; // For each route, display summary information. var marker;// var infowindow = new google.maps.InfoWindow({// content: ''// }); for (let i = 0; i < route.legs.length; i++) { const routeSegment = i + 1; marker = new google.maps.Marker({ // icon: svgMarker, // map: instance.map,position: {lat: route.legs[i].start_location.lat(),lng: route.legs[i].start_location.lng()},scaledSize: new google.maps.Size(80, 80),origin: new google.maps.Point(0, 0),anchor: new google.maps.Point(32,65),icon:"https://manawatunz.co.nz/wp-content/uploads/2021/11/manawatu-marker.png",labelOrigin: new google.maps.Point(40,33),//label:"",// label : {// className: 'marker-label',// text: route.legs[i].duration.text,// color: "blue",// align:'bottom',// }, zIndex:9999 });//marker.setMap(instance.map);instance = window.googleMap; map = instance.map;// var bounds = response.routes[0].bounds;// infowindow.setContent("hello");// infowindow.open(instance.map, marker);// google.maps.event.addListener(marker, 'click', (function(marker) {// return function() {// infowindow.setContent("hello");// infowindow.open(instance.map, marker);// instance.map.panTo(this.getPosition());// }// })(marker)); }let routeCenter = Math.round(route.legs.length / 2); infowindow = new google.maps.InfoWindow({content: RouteName,position: new google.maps.LatLng(route.legs[routeCenter].start_location.lat(), route.legs[routeCenter].start_location.lng()) }); infowindow.open(map); }) .catch((e) => window.alert("Directions request failed due to " + e));},error: function (request, error) { console.log(error)}});}jQuery(".select-main-section > .select-main-section-inner .set > .content.route_lists").find('label').off('click').click(function(event) { event.stopPropagation(); event.preventDefault(); var radio = jQuery(this).find('input.route_list'); radio.prop('checked', !radio.prop('checked'));if (radio.prop('checked')) { //jQuery(".select-main-section-inner .set > a > .inner-circle").find('input').prop('checked', false); fetchRoute(radio.val()); } else {fetchRoute(1111111111);// var seeDo = jQuery(".select-main-section-inner .set > a > .inner-circle").find('input[value="See & Do"]');// setTimeout(() => {// seeDo.prop('checked', true);// seeDo.trigger('click');// },1000); }});var seeDo = jQuery(".select-main-section-inner .set > a > .inner-circle").find('input[value="See & Do"]');setTimeout(() => {seeDo.prop('checked', true);seeDo.trigger('click');},5000);var autoSelectCat = ['672', '676', '890', '669', '667', '666', '671', '662', '624'];if (!seeDo.is(":checked")) {if (seeDo.parent().parent().parent().parent().parent().find('.content').find('input[value="619"]').is(":checked")){// getCategoryList(autoSelectCat);seeDo.parent().parent().parent().parent().parent().find('.content').find('input[type="checkbox"]').each(function () {if (autoSelectCat.includes(jQuery(this).attr('value'))) {jQuery(this).prop('checked', true);// jQuery(this).trigger('click');}});} else {// getCategoryList([]);seeDo.parent().parent().parent().parent().parent().find('.content').find('input[type="checkbox"]').each(function () {if (autoSelectCat.includes(jQuery(this).attr('value'))) {jQuery(this).prop('checked', false);// jQuery(this).trigger('click');}});}}// Select all after clicking the topItem in Plan your trip PagejQuery(".select-main-section-inner .set > a > .inner-circle").on("click", function (event) {event.preventDefault();var clickedInput = jQuery(this);var isChecked = clickedInput.find('input[type="checkbox"]').is(':checked');var checkboxInputs = clickedInput.closest(".set").find('input[type="checkbox"]');instance = window.googleMap;instance.map.addListener("center_changed", () => {var wpgb = WP_Grid_Builder.instance(2);wpgb.facets.autoRefresh = false;if (instance.markers != null) {jQuery.each(instance.markers, function (index, value) {value.setMap(null);})}});if (instance.markers != null) {jQuery.each(instance.markers, function (index, value) {value.setMap(null);});}if (markers.length > 0) {for (let i = 0; i < markers.length; i++) {markers[i].setMap(null);}}if(clickedInput.is(':checked')) {//Do stuff}if (isChecked) {checkboxInputs.prop('checked', false)let selectedLanguages = [];clickedInput.closest(".select-main-section-inner").find('input.categoryListAccordion:checked').each(function() {selectedLanguages.push(jQuery(this).val());});getCategoryList(selectedLanguages.toString());} else{checkboxInputs.prop('checked', true)let selectedLanguages = [];clickedInput.closest(".select-main-section-inner").find('input.categoryListAccordion:checked').each(function() {selectedLanguages.push(jQuery(this).val());});getCategoryList(selectedLanguages.toString());}});jQuery(".categoryListAccordion").on('change', function() {//var cat_id = this.checked ? this.value : '';//var languages = [];let changedInput = jQuery(this);instance = window.googleMap; instance.map.addListener("center_changed", () => {var wpgb = WP_Grid_Builder.instance(2);wpgb.facets.autoRefresh = false;if (instance.markers != null) {jQuery.each(instance.markers, function(index, value) {value.setMap(null);})}});if (instance.markers != null) {jQuery.each(instance.markers, function(index, value) {value.setMap(null);});}if (markers.length > 0) {for (let i = 0; i < markers.length; i++) {markers[i].setMap(null);}}/* jQuery('.categoryListAccordion').each(function() {if (jQuery(this).is(":checked")) {languages.push(jQuery(this).val());} else {const index = languages.indexOf(jQuery(this).val());if (index > -1) { // only splice array when item is foundlanguages.splice(index, 1); // 2nd parameter means remove one item only}} });*/let selectedLanguages = [];changedInput.closest(".select-main-section-inner").find('input.categoryListAccordion:checked').each(function() {selectedLanguages.push(jQuery(this).val());});/* if (languages == "") {//wpgb.facets.autoRefresh = true;//return true;} */getCategoryList(selectedLanguages.toString());});});// Drag and save to localstoragejQuery(document).ready(function () {jQuery(document).on('click',".day-row-close",function () { var array = localStorage.getItem("itinaryData");array = JSON.parse(array);var assignedDay = parseInt(jQuery(this).siblings("h2").text().replace(" ", "").replace("DAY", ""))-1;array.splice(assignedDay, 1);localStorage.setItem("itinaryData",JSON.stringify(array));popupDataCall();//console.log("deleted");});});jQuery('#mytriplistpopup').on('DOMSubtreeModified', function(){jQuery('#mytriplistpopup').children().each(function(i) {var array = localStorage.getItem('itinaryData');array = JSON.parse(array);var listId = jQuery(this).attr("id");if (listId) {var getTrip = parseInt(listId.replace("removePopupRow", ""));var assignedDay = parseInt(jQuery(this).prevAll().filter('.custom-day').first().text().replace(" ", "").replace("DAY", ""));let indexNumber = assignedDay-1;for (let i = 0; i < array.length; i++) {if (i !== indexNumber) {let subObjectValues = Object.values(array[i])[0];let morningArray = subObjectValues["morning"];if (morningArray.indexOf(getTrip) !== -1) {morningArray.length = 0;//console.log(`The value jQuery{getTrip} already exists in another "morning" array.`);break;}}}let subObjectValues = Object.values(array[indexNumber])[0];let morningArray = subObjectValues["morning"];if (morningArray.indexOf(getTrip) === -1) {morningArray.push(getTrip);}}localStorage.setItem('itinaryData',JSON.stringify(array));});});jQuery("body").on("click", "#adddaybtn", function() {if (localStorage.getItem('itinaryData') === null) {const day = new Date().toLocaleDateString();var newdaydata = {[day]: {'morning': [],'afternoon': [],'evening': []}};var arrayJS = [];arrayJS.push(newdaydata)localStorage.setItem('itinaryData', JSON.stringify(arrayJS));} else {var array = localStorage.getItem('itinaryData');var arrayJS = JSON.parse(array) || [];var newDay = new Date(Object.keys(arrayJS.slice(-1)[0])[0]);newDay.setDate(newDay.getDate() + 1);var newdaydata = {[newDay.toLocaleDateString()]: {'morning': [],'afternoon': [],'evening': []}};arrayJS.push(newdaydata)localStorage.setItem('itinaryData', JSON.stringify(arrayJS));}popupDataCall();});jQuery("body").on("click", "#downloadbtn", function() {var itinaryData = localStorage.getItem("itinaryData");console.log("itinaryData");console.log(itinaryData);if (itinaryData != null) {window.open('/generate-itinerary.php?itinerary_data=' + btoa(itinaryData));}});jQuery('#add2TripBtn').click(function() {var id = '15424';var dayPeriod = jQuery('input[name="dayperiodradios"]:checked').val();storeValue2Local(parseInt(id), dayPeriod);if (countTrip() > 0) {if (jQuery("#countTrip").length == 0) {jQuery('#mm-mytrip-link').append('' + countTrip() + '');} else {document.getElementById("countTrip").textContent = countTrip();}//jQuery(''+count+'').appendTo('#mm-mytrip-link');}jQuery('#alreadyInTrip').css('display', 'flex');jQuery('#add2Trip').hide();oxyCloseModal();});jQuery(".period-of-day").sortable();jQuery('.wpgb-card-inner').draggable({connectToSortable: ".period-of-day",stop: function(event, ui) {},cursor: "pointer",helper: "clone",snap: true});jQuery('#morning').sortable({start: function(event, ui) {},receive: function(event, ui) {var countbox = jQuery("#morning").children('div.wpgb-card-inner').length;jQuery("#morning .period-box").remove();if (countbox == 1) {jQuery("#morning").append('');}},stop: function(e, ui) {var id = jQuery(ui.item).find("a.side-box-remove-event").data('target');jQuery(ui.item).attr('id', id);var removebtn = jQuery(ui.item).find("a.side-box-remove-event");jQuery(removebtn).attr('data-area', 'morning');storeValue2Local(id, 'morning');var post_id = '.wpgb-post-' + id;jQuery(post_id + ' .side-box-event-trip').hide();jQuery(post_id + ' .side-box-event-trip-added').css('display', 'flex');// jQuery(post_id).draggable( "disable" )jQuery(post_id + ' .wpgb-card-inner').draggable().draggable('disable');}});jQuery('#afternoon').sortable({start: function(event, ui) {},receive: function(event, ui) {var countbox = jQuery("#afternoon").children('div.wpgb-card-inner').length;jQuery("#afternoon .period-box").remove();if (countbox == 1) {jQuery("#afternoon").append('');}},stop: function(e, ui) {var id = jQuery(ui.item).find("a.side-box-remove-event").data('target');jQuery(ui.item).attr('id', id);var removebtn = jQuery(ui.item).find("a.side-box-remove-event");jQuery(removebtn).attr('data-area', 'afternoon');storeValue2Local(id, 'afternoon');var post_id = '.wpgb-post-' + id;jQuery(post_id + ' .side-box-event-trip').hide();jQuery(post_id + ' .side-box-event-trip-added').css('display', 'flex');// jQuery(post_id).draggable( "disable" )jQuery(post_id + ' .wpgb-card-inner').draggable().draggable('disable');}});jQuery('#evening').sortable({start: function(event, ui) {},receive: function(event, ui) {var countbox = jQuery("#evening").children('div.wpgb-card-inner').length;jQuery("#evening .period-box").remove();if (countbox == 1) {jQuery("#evening").append('');}},stop: function(e, ui) {var id = jQuery(ui.item).find("a.side-box-remove-event").data('target');jQuery(ui.item).attr('id', id);var removebtn = jQuery(ui.item).find("a.side-box-remove-event");jQuery(removebtn).attr('data-area', 'evening');storeValue2Local(id, 'evening');var post_id = '.wpgb-post-' + id;jQuery(post_id + ' .side-box-event-trip').hide();jQuery(post_id + ' .side-box-event-trip-added').css('display', 'flex');// jQuery(post_id).draggable( "disable" )jQuery(post_id + ' .wpgb-card-inner').draggable().draggable('disable');}});jQuery("body").on("click", ".side-box-remove-event", function() {var target = jQuery(this).data('target');var currentDate = jQuery(this).data('currentdate');var area = jQuery(this).data('area');//setInterval(function () { deleteValueFromLocal(target, area); }, 1000);deleteValueFromLocal(target, area, currentDate);jQuery("#" + target).remove();jQuery("#removePopupRow" + target).remove();var post_id = '.wpgb-post-' + target;var html = "";html += '

';html += '

';//html += 'Foxton Beach (4)';html += 'Foxton Beach (5)';html += '

My Trip

';html += '

';jQuery(".listing-detail-addtrip").empty();jQuery(".listing-detail-addtrip").append(html);jQuery(post_id + ' .side-box-event-trip').show();jQuery(post_id + ' .side-box-event-trip-added').css('display', 'none');// jQuery(post_id).draggable( "disable" )jQuery(post_id + ' .wpgb-card-inner').draggable().draggable('enable');var countbox = jQuery("#evening").children('div.period-box').length;if (jQuery("#countTrip").length == 0) {jQuery('#mm-mytrip-link').append('' + countTrip() + '');} else {jQuery("#countTrip").css('display', 'block');document.getElementById("countTrip").textContent = countTrip();if (countTrip() == 0) {jQuery("#countTrip").css('display', 'none');jQuery("#countTrip").empty();}}// var validateCountTrip = jQuery("#countTrip").text();// if(validateCountTrip == 0)// {// jQuery("#countTrip").remove();// }//jQuery("#countTrip").load(location.href + " #countTrip");if (countbox < 2) {jQuery("#morning").append('');} else {}});function deleteValueFromLocal(id, table, currentDate = '') {var activedate = jQuery("#selectedDay").val();if (currentDate != '') {var activedate = currentDate;}var shortdate = (new Date(activedate)).toLocaleDateString('en');var array = localStorage.getItem('itinaryData');var arrayJS = JSON.parse(array) || [];if (JSON.stringify(arrayJS).indexOf([shortdate]) > -1) {var indexval = getIndexOfDay(arrayJS, shortdate);if (table == 'morning') {var removedArray = arrayRemove(arrayJS[indexval][shortdate].morning, id);arrayJS[indexval][shortdate].morning.length = 0;removedArray.forEach(element =>arrayJS[indexval][shortdate].morning.push(element));} else if (table == 'afternoon') {var removedArray = arrayRemove(arrayJS[indexval][shortdate].afternoon, id);arrayJS[indexval][shortdate].afternoon.length = 0;removedArray.forEach(element =>arrayJS[indexval][shortdate].afternoon.push(element));} else {var removedArray = arrayRemove(arrayJS[indexval][shortdate].evening, id);arrayJS[indexval][shortdate].evening.length = 0;removedArray.forEach(element =>arrayJS[indexval][shortdate].evening.push(element));}//console.log(arrayJS);localStorage.setItem('itinaryData', JSON.stringify(arrayJS));} else {console.log('test');}}jQuery("body").on("click", "#morningaddspace", function() {jQuery("#morning").append('');});jQuery("body").on("click", "#afternoonaddspace", function() {jQuery("#afternoon").append('');});jQuery("body").on("click", "#eveningaddspace", function() {jQuery("#evening").append('');});jQuery(document).on('click', '#openModalFilter', function() {jQuery('#modalfilter').parent('.oxy-modal-backdrop').css('display', 'flex').addClass('live');});jQuery(document).on('click', '#openModalItinary', function() {if (jQuery('#modalitinarycontainer').children().length > 0) {} else {var a = jQuery('#itineraryContainer').html();jQuery('#modalitinarycontainer').html(a);jQuery('#itineraryContainer').empty();}jQuery('#modalItinary').parent('.oxy-modal-backdrop').css('display', 'flex').addClass('live');jQuery('#itinarycontent').css('display', 'flex');jQuery('#itinarycontent-nextday').css('display', 'flex');});// jQuery(document).on('click', '.add-to-trip', function () {// var target = jQuery(this).data('target');// jQuery('#addtripmodalinput').val(target);// //jQuery('#trip-modal')// // codeAddress();// });jQuery(document).on('click', '.add-to-trip', function() {var id = jQuery(this).data('target');var pageId = jQuery(this).data('pageid');var dayPeriod = jQuery('input[name="dayperiodradios"]:checked').val();if(pageId == "eventspage"){dayPeriod = "morning";}var activedate = jQuery("#selectedDay").val();var CurrentDayRadio = jQuery("#currentdayradio").val();if (CurrentDayRadio == "currentday") {jQuery("#currentdayradio").val(activedate);}var dayval = (new Date(activedate)).toLocaleDateString('en');if (dayval == '') {var dayval = jQuery('input[name="dayradio"]:checked').val();} else {var dayval = 'currentday';}storeValue2Local(parseInt(id), dayPeriod);if (countTrip() > 0) {if (jQuery("#countTrip").length == 0) {jQuery('#mm-mytrip-link').append('' + countTrip() + '');} else {jQuery("#countTrip").css('display', 'block');document.getElementById("countTrip").textContent = countTrip();}}getLocalStorageValues();var add2tripBtn = jQuery(".add-to-trip[data-target='" + id + "']");var addedAlreadyBtn = jQuery(".already-itinaried[data-target='" + id + "']");// var add2tripBtn = jQuery(".add-to-trip").find('[data-target='+id+']')// var html = "";html += 'Foxton Beach (6)';// jQuery(add2tripBtn).hide();jQuery(add2tripBtn).empty();jQuery(add2tripBtn).append(html);var heartHtml ="";heartHtml += '

';heartHtml += '

';heartHtml += 'Foxton Beach (7)';//heartHtml += ' ';heartHtml += '

';heartHtml += '

';jQuery(".subcatagoryPage"+id).empty();jQuery(".subcatagoryPage"+id).append(heartHtml);// subcatagoryPagepopupDataCall();jQuery(addedAlreadyBtn).css('display', 'flex');jQuery(addedAlreadyBtn).css('flex-direction', 'row')jQuery('#alreadyInTrip').show(); jQuery('#add-my-trip') .parent('.oxy-modal-backdrop') .css('display', 'flex') .addClass('live');});jQuery("body").on("click", "#currentDaySelected", function() {// console.log('clicked');jQuery("#itinarycontent").css('display', 'flex');jQuery("#itinarycontent-nextday").hide();jQuery('#selectDay1modal').parent('.oxy-modal-backdrop').css('display', 'flex').addClass('live');});jQuery("body").on("click", ".share-listing", function() {var permalink = jQuery(this).data('permalink');jQuery('.input_share input').val(permalink);oxyCloseModal();jQuery('#share-modal').parent('.oxy-modal-backdrop').css('display', 'flex').addClass('live');});jQuery("body").on("click", "#closeDatePickerModal", function() {var emtpydate = jQuery("#selectedDay").val();if (emtpydate == '') {var dateToday = new Date();const d = new Date(dateToday);var currentYear = d.getFullYear()const months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let currentMonth = months[d.getMonth()];var currentDay = d.getDate();var day = getDayName(d, "en-NZ");jQuery("#currentDaySelected").text(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#selectDayModalInput").val(day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#currentDaySelected").css({"font-size": "18px!important","font-weight": "400","line-height": "1.5!important","color": "#323335!important"});jQuery("#getYearModal").text(currentYear);jQuery("#getDayWithMonthModal").text(day + ', ' + currentDay + ' ' + currentMonth);localStorage.setItem("currentDay", day + ' ' + currentMonth + ', ' + currentDay + ' ' + currentYear);jQuery("#selectedDay").val(dateToday);}});// jQuery('#addtripApplyButton').click(function () {// var id = jQuery('#addtripmodalinput').val();// var dayPeriod = jQuery('input[name="dayperiodradios"]:checked').val();// var activedate = jQuery("#selectedDay").val();// var dayval = (new Date(activedate)).toLocaleDateString('en');// if (dayval == '') {// var dayval = jQuery('input[name="dayradio"]:checked').val();// } else {// var dayval = 'currentday';// }// storeValue2Local(parseInt(id), dayPeriod);// getLocalStorageValues();// var add2tripBtn = jQuery(".add-to-trip[data-target='" + id + "']");// var addedAlreadyBtn = jQuery(".already-itinaried[data-target='" + id + "']");// // var add2tripBtn = jQuery(".add-to-trip").find('[data-target='+id+']')// jQuery(add2tripBtn).hide();// jQuery(addedAlreadyBtn).css('display', 'flex');// jQuery(addedAlreadyBtn).css('flex-direction', 'row')// // localStorage.setItem("currentDay", day +' '+currentMonth+', '+currentDay+' ' + currentYear);// oxyCloseModal();// });var defaultDate = jQuery("#addtripmodalinput").val();// console.log(defaultDate)if (defaultDate == '') {jQuery("#showDatePickerDivContainerModal").css('display', 'flex');jQuery("#showRadioDivContainerModal").css('display', 'none');} else {jQuery("#showDatePickerDivContainerModal").css('display', 'none');jQuery("#showRadioDivContainerModal").css('display', 'flex');}var shortdate = (new Date()).toLocaleDateString('en');jQuery("#selectDayModalInput").val(shortdate)jQuery("#addtripmodalinput").val(shortdate)jQuery('#openDatePicker').click(function() {jQuery("#selectDayModalInput").datepicker({onSelect: function(dateText) {updateListingPageDate: (this.value);},minDate: dateToday}).datepicker();});function updateListingPageDate(str) {var shortdate = (new Date(str)).toLocaleDateString('en');jQuery("#addtripmodalinput").val(shortdate)jQuery("#showDatePickerDivContainerModal").css('display', 'none');jQuery("#showRadioDivContainerModal").css('display', 'flex');}});jQuery(document).ready(function() {jQuery("#div_block-633-222176").on("click", function() {setTimeout(function (){popupDataCall();}, 1000); });});

Foxton Beach (27)

Back

EXPLORE > RELAX >

Foxton Beach (40)

Back

BUSINESS //
PAKIHI

CONFERENCESectorsInvestBusiness Support

Foxton Beach (41)Foxton Beach (42)Foxton Beach (43)Foxton Beach (44)Foxton Beach (45)

Foxton Beach (46)

Back

BUSINESS> CONFERENCE &BUSINESS EVENTS>

EXPLORELIVEBUSINESSOUR STORY

Foxton Beach (47)

MAP

MY TRIP

Foxton Beach (49)

ADD TO your trip itinerary

x

You can view your trip itinerary in “Plan your trip”

Step 1: Select a date

Foxton Beach (50)

Step 2: Select morning, afternoon or evening

APPLY

SHARE LISTING

x

Share this listing via

COPY LINK

Foxton Beach

https://www.newzealand.com/my/foxton-beach/

Located less than 40 minutes from Palmerston North, Foxton Beach is a small west coast beach settlement with a lot to offer.

Foxton Beach is the outdoor enthusiasts dream and a popular destination, due to the large number of activities which include swimming, kiteboarding, surfing and fishing.

For those wishing to brunch the day away, there are a number of great food options on offer; including the Little White Rabbit cafe and Ocean Beach Eatery.

Foxton Beach is a perfect weekend getaway option for families, couples or groups of friends as it offers a number of accommodation options catering to all types.

Make sure to check our Guide to Staying Safe before getting into the water.


VISIT THE WEBSITE

My Trip

Add to your tripAlready Added

Foxton Beach (51)

My Trip

SharePrint
Print

What’s nearby?

';html += '

Already Added

';jQuery(".add-to-trip").html(html);jQuery(".add-to-trip").removeClass('add-to-trip');}/////// Adding function for clickfunction countTrip(){var itinaryDataValues = localStorage.getItem("itinaryData");var itinaryData = JSON.parse(itinaryDataValues);let validateField = []; jQuery.each(itinaryData,function(index,value){ jQuery.each(value,function(date,datas){ if(datas.morning.length > 0) { jQuery.each(datas.morning,function(indexm,valuem){ validateField.push("Yes"); }) } }); }); if(validateField.length > 0){if(jQuery("#countTrip").length == 0) { jQuery('#mm-mytrip-link').append(''+validateField.length+'');} else{jQuery("#countTrip").css('display','block');document.getElementById("countTrip").textContent=validateField.length;}} else{jQuery("#countTrip").css('display','none');} }}/**jQuery(document).on('click', '.add-to-trip', function () { var pageID = '15424'; var id = pageID; var dayPeriod = jQuery('input[name="dayperiodradios"]:checked').val(); var activedate = jQuery("#selectedDay").val(); var CurrentDayRadio = jQuery("#currentdayradio").val(); if(CurrentDayRadio == "currentday") { jQuery("#currentdayradio").val(activedate); } var dayval = (new Date(activedate)).toLocaleDateString('en'); if (dayval == '') {var dayval = jQuery('input[name="dayradio"]:checked').val(); } else {var dayval = 'currentday'; } storeValue2Local(parseInt(id), dayPeriod); countTrip(); });****/fullHeartIcon();jQuery(document).on("click",".add-to-trip",function(){fullHeartIcon();})});

Foxton Beach (56)

Subscribe to Our Manawatū Fresh Finds Newsletter

BROUGHT TO YOU By

Foxton Beach (57)

CONTACT US

x

Foxton Beach (59)

Palmerston North City i-SITE
The Square, Palmerston North

0800 MANAWATU
(626 292)
[emailprotected]

Foxton Beach (60)

Feilding and District
Information Centre

Feilding Railway Station
61 Aorangi Street

+64 6 323 3318
[emailprotected]

MY TRIP

Foxton Beach (61)

TIPS:

Tap Foxton Beach (62)on anything you like to add/remove it from My Trip. Then download so you can print or share your upcoming trip to Manawatū. Explore Now >

You can drag and drop activities to reorder them.

Add Day

This site uses cookies to provide you with the best experience. By continuing to use this site you consent to our use of cookies. Find out more in our Privacy Policy and Terms of Use.

Accept Cookies

Foxton Beach (2024)
Top Articles
Latest Posts
Article information

Author: Laurine Ryan

Last Updated:

Views: 6301

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Laurine Ryan

Birthday: 1994-12-23

Address: Suite 751 871 Lissette Throughway, West Kittie, NH 41603

Phone: +2366831109631

Job: Sales Producer

Hobby: Creative writing, Motor sports, Do it yourself, Skateboarding, Coffee roasting, Calligraphy, Stand-up comedy

Introduction: My name is Laurine Ryan, I am a adorable, fair, graceful, spotless, gorgeous, homely, cooperative person who loves writing and wants to share my knowledge and understanding with you.