1095 0 0 0
Last Updated : 2025-04-28 23:37:13
How do you select a particular option in a SELECT element in jQuery?
A selector to get the middle option-element by value is
$('.selDiv option[value="SEL1"]')
For an index:
$('.selDiv option:eq(1)')
For a known text:
$('.selDiv option:contains("Selection 1")')
Then add selected
$('.selDiv option:eq(1)').prop('selected', true)