I have an array of select dropdowns as such:
<select name="item[1]">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
<select name="item[2]">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
<select name="item[3]">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
<select name="item[4]">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
I am trying to parse through them using Jquery. The number in the name is populated by the ID number of the item in my database. I basically want to parse through each one, if it is a yes, then use the ID to get the price of the item from the database to calculate a total. Is this even possible with Jquery? I can do the rest of the code no problem, I just need help with parsing through all of the item and return the value and ID for each one.
$("select").each(function() { if (this.value == "Yes") //do stuff })