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

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

Ankur Rajput
Asked 05-07-2025
183

Answer (1)
$('#id1 option[value="'+id+'"]').prop('selected', true);
Deepak Sharma
Asked 28-06-2018
45 Likes
Comments
Write comment

Submit your answer