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 20-09-2020
53

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

Submit your answer