Posted on Leave a comment

javascript – Remove and restore options from select – Stack Overflow

Best approach is store a clone of the options on page load. Then clone that clone to restore, so you always keep the first clone as the cache. var $options=$(‘#sel option’).clone(); function restore(){ $(‘#sel’).html( $options.clone()) }

Source: javascript – Remove and restore options from select – Stack Overflow