Skip to main content
4 of 4
replaced http://stackoverflow.com/ with https://stackoverflow.com/
user avatar
user avatar

How do you select a particular option in a SELECT element in jQuery?

If you know the Index, Value or Text. also if you don't have an ID for a direct reference.

This, this and this are all helpful answers.

Example markup

<div class="selDiv"> <select class="opts"> <option selected value="DEFAULT">Default</option> <option value="SEL1">Selection 1</option> <option value="SEL2">Selection 2</option> </select> </div> 
CarolinaJay65
  • 28.5k
  • 22
  • 59
  • 74