Manipulate select options from a select box using jQuery. A specific option can be removed by using the remove()
function.
For example.
Remove all options except the first one.
$("#ELEM option").not(":eq(0)").remove();
Click here to remove all options except the first one.
Remove the second option from the selection.
Note: The count starts at zero. Therefore second option is at position # 1.
$("#ELEM option").eq(1).remove();
Click here to remove the second option.
Create a NodeJs Hello World example - https://t.co/7PS2IOu7bF
— Consistent Coder (@ConsistentCoder) Nobyembre 17, 2015