$(".kota").on("input", function (){
    let keyword = $(this).val();
    console.log(keyword);
    if(keyword.length >= 2){
        $.ajax({
            url: "asset/autocomplete_wilayah.php",
            type: "POST",
            data: { keyword: keyword },
            success: function(data){
                $(".suggestion").html(data).show();
            }
        });
    } else {
        $(".suggestion").hide();
    }
});

$(document).on("click", ".wilayah-items", function(){
    let value = $(this).text();
    console.log(value);
    $(".kota").val(value);
    $(".suggestion").hide();
});