It's been a while since I've coded in jQuery, but this is an issue I don't remember happening before. I have a simple form:
<form id="location">
<input type="text" name="city" id="city" placeholder="Enter your city" required="required">
<input type="text" name="zip" id="zip" placeholder="Enter your zip code" required="required">
<input type="submit" name="submit" value="GET Weather" id="submit">
</form>
and a call to get the value of the inputs:
<script>
$('#submit').click(function() {
var city = $('#city').val();
var zip = $("#zip").val();
});
console.log(city);
console.log(zip);
</script>
And for some reason I'm getting the HTML returned back of the two inputs as so-
<input type="text" name="zip" id="zip" placeholder="Enter your zip code" required="required">
Why am I not getting back the values of the inputs?