$(document).ready(function () { //copy options let options = $('#villeDepart option').clone(); //react on keyup in textbox $('#villeDepartText').keyup(function () { let val = $(this).val().toString().toLowerCase(); $('#villeDepart').empty(); //take only the options containing your filter text or all if empty options.filter(function (idx, el) { return val === '' || $(el).text().toLowerCase().indexOf(val) >= 0; }).appendTo('#villeDepart');//add it to list }); //copy options let optionsArrive = $('#villeArrive option').clone(); //react on keyup in textbox $('#villeArriveText').keyup(function () { let val = $(this).val().toString().toLowerCase(); $('#villeArrive').empty(); //take only the options containing your filter text or all if empty optionsArrive.filter(function (idx, el) { return val === '' || $(el).text().toLowerCase().indexOf(val) >= 0; }).appendTo('#villeArrive');//add it to list }); });