javascript - How to remove all values from a dropdown than selected value -


i have dropdown. want remove options dropdown.

data.record.categoryid data.record.categoryid 

here got value (data.record.categoryid) 3. want remove options other value 3 remove dropdown using jquery.

how can this? value of data.record.categoryid change each time. want remove other options value of data.record.categoryid

try code

$("#your_dropdown_id").children().not(":selected").remove(); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

javascript - Bootstrap Popover: iOS Safari strange behaviour -