hafidu
5/1/2019 - 12:38 AM

Jquery : Clear the input select form after first index

Jquery : Clear the input select form after first index

const clearSelect = function(selector) {
  if($(`#${selector} option`).length > 0) {      
    $(`#${selector} option`).filter((i, node) => {
      return i != 0;
    }).remove();
  };
}