I need a filter with jquery options by values, If I have:
<select class="generic-widget" id="phone_line" name="phone_line"> <option value=""></option> <option value="2">71158189</option> <option value="4">71158222</option> <option value="3">99199152</option> <option value="1">98199153</option> </select>
In this case, I should only show options with value = "3" and value = "4".
Using:
$('#phone_line option[value!="3"]').remove();
I can filter only one value, but I need to use something with x values
How can i do this? Thanks.
source share