before() works in everything but Chrome
Part of my site inserts points selected from a Google Map after the user clicks the submit button.
It will loop through an array of points clicked and add each one as a hidden form value then submit the form.
This works great in IE, FF, and Opera, but doesn't work in Chrome.
Here's the bit of code that's running:
$('#reviewRoute').click(function(){ for (var i = 0; i < nextMarker; i++) { $('#hiddenValues').before('<input type="hidden" value="' + markerArray[i].getLatLng() +'" name="coordinate' + i + '"'); } if (nextMarker < 2){ alert("You must select at least 2 points"); } else{ $('#coordinates').submit(); } });
Any help or insight would be appreciated.
Thank you.