Skip to content

Instantly share code, notes, and snippets.

@hafidu
hafidu / function-clearSelect.js
Created May 1, 2019 00:38
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();
};
}