jQuery-Selectric icon indicating copy to clipboard operation
jQuery-Selectric copied to clipboard

How do you select an option value based on a value

Open BuggsyGuy opened this issue 7 years ago • 2 comments

I know that you can select an option using the following:

$('#set_value').prop('selectedIndex', 0).selectric('refresh')

However, what happens if you do not know what the index is? How do you select an option based on a given value?

Cheers,

Jay

BuggsyGuy avatar Jan 31 '18 19:01 BuggsyGuy

Also wondering about it

Kotpes avatar Nov 20 '18 08:11 Kotpes

$('#set_value').val('some_value').selectric('refresh');

lcdsantos avatar Nov 20 '18 11:11 lcdsantos