I have the following scenario:
a series of SELECT elements in a series of DIV with the same class.
<div class="elementLine">
persona 1
<select id="coches">
<option value='si' selected>si</option>
<option value='no'>no</option>
</select>
<select id="motos">
<option value='si'>si</option>
<option value='no' selected>no</option>
</select>
</div>
<div class="elementLine">
persona 2...
I need to access the value of each OPTION: SELECTED, iterating through each line of the with the .each function; The problem is that I can not get the SELECT value. Does anyone know how to access that particular item?
$( ".elementLine" ).each(function(index, value){
var tieneCoche= $(this).children( $("#coches").children("option:selected") ).val() ;
console.log( "coche value:"+tieneCoche);
});