I need to capture the text variable selected from id
<select name="city" id="selectedCity" data-native-menu="false" onchange="location = this.options[this.selectedIndex].value;">
<option value="#">-- Select City --</option>
<option id="atl" value="#tiera">Atlanta</option>
<option id="aus" value="#tierc">Austin</option>
<option id="bal" value="#tiera">Baltimore</option>
<option id="bos" value="#tiera">Boston</option>
</select>
problem: no matter which option is selected, I always get the last var listed, in this case I always get Boston.
function myFunction() {
document.getElementById("selectedCity").reset();
}
$(document).ready(function() {
var cityInfo = $("#atl").text();
var cityInfo = $("#aus").text();
var cityInfo = $("#bal").text();
var cityInfo = $("#bos").text();
$("#selectedCity").change(function(){
$("h1").text(cityInfo);
});
});