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 03-11-2019
37

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

Submit your answer