Newly Generated Ul Li Input Values Not Getting Pushed Into Waypoints Array / Not Working With Google Maps Places Autocomplete
I have a semi-functional trip planner here: http://roadtripsharing.com/plan-a-road-trip-js/ Source code:
Solution 1:
Here are few changes you need to make in your JS, I already did for you-
var waypts = [];
functionaddplace() {
var inps = $('#waypoints input[type=text]');
for (var i = 1; i <= inps.length; i++) {
var a = $('#waypoints input[type=text]#place'+i);
waypts.push({
location: a.val(),
stopover: true
});
}
}
check this- http://codepen.io/himanshuapril1/pen/RaQLgv
Post a Comment for "Newly Generated Ul Li Input Values Not Getting Pushed Into Waypoints Array / Not Working With Google Maps Places Autocomplete"