jquery - Selecting an option tag which is exactly equal to the search text -
i have coded setting drop down menu's option specific value when text known have encountered problem. following code use:
$('#dropdownid option:contains("' + searchtext + '")').prop('selected', true).change();
the contains
part of code won't serve purpose of code since drop down has 2 options sub strings of 1 another.
is there way specify want exact match of given searchtext
??
Comments
Post a Comment