I have a select which is accessible only by name. I need to set the option with particular text in the select.
This is what I have now:
var selection = $("[name='wpv-collection']");
$(selection).filter(function() {
window.alert($(this).text());
return $(this).text().includes(s);
}).prop('selected', true);
but the $this.text() is including all options.
Can someone help with what is wrong pls?