<form name="storelocator_cities_form" id="storelocator_cities_form">
<select name="storelocator_city" id="storelocator_city" onchange="storeLocatorForm.fetchStoresByCountryAndPostCode(this)">
<option value=""></option>
</select>
</form>
Hi i want to capture the option value and then compare it to a specific city and i'm stuck. I'am new with both JS and jQuery but i guess that i will need to do something like
jQuery(function(){
$('#storelocator_city').on('change',function(){
var city = $(this).val();
});
});
I would like a way to see that i get the correct value in the var in the console.