Quantcast
Channel: jQuery remove options from select - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by meder omuraliev for jQuery remove options from select

$
0
0
$('.ct option').each(function() {    if ( $(this).val() == 'X' ) {        $(this).remove();    }});

Or just

$('.ct option[value="X"]').remove();

Main point is that find takes a selector string, by feeding it x you are looking for elements named x.


Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>