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 -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -