If I have select with id=”select_test”, how to delete all options inside but select stay on page, so I can load again some new options ? ( I get answer how to load, but I cannot empty, I tried like $('#select_test').empty();
and
$('#select_test').find('option').remove();
but it doesn’t work ). Can someone say what I did wrong ?
It should work. Look at this fiddle.
Or try this code: