I have a select element with this structure:
<div class="ddl">
<select>
<option selected value="select">Select</option>
<option value="T">Toyota</option>
<option value="P">Porsche</option>
<option value="N">Nissan</option>
<option value="V">Volkswagen</option>
</select>
</div>
And there is no ID of the select element to pass it to the jQuery selector, just the parent class of the div.
How can I put any of these elements as the selected element by text, index or value?
There are different ways to interact with selector.
Using jQuery 1.6 and upper:
By text:
By index:
By value:
With older versions:
By text:
By index:
By value: