
	$(document).ready(function () {
  // Send Search Text to the server
  $("#toCity").keyup(function () {
    let searchTexts = $(this).val();
    if (searchTexts != "") {
      $.ajax({
        url: "iata_from_city.php",
        method: "post",
        data: {
          querys: searchTexts,
        },
        success: function (response) {
          $("#show-list-to").html(response);
        },
      });
    } else {
      $("#show-list-to").html("");
    }
  });
  
  // Set searched text in input field on click of search button
  $(document).on("click", "#show-list-to li", function () {
    $("#toCity").val($(this).text());
    $("#show-list-to").html("");
  });
  });
  
  
	