<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
    function showDiv(select) {
        if (select.value == 0) {
            $("#select_suami_istri").hide();
        }
        if (select.value == 1) {
            $("#select_suami_istri").show();
        }
        if (select.value == 2) {
            $("#select_suami_istri").hide();
        }
    }
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
    function showDiv(select) {
        if (select.value == 0) {
            $("#select_suami_istri").hide();
        }
        if (select.value == 1) {
            $("#select_suami_istri").show();
        }
        if (select.value == 2) {
            $("#select_suami_istri").hide();
        }
    }
</script>
<script type="text/javascript">
    $('#kota_kabupaten').change(function() {
        var nm_kot_kab = $(this).val();
        $.ajax({
            type: 'POST',
            url: '<?= base_url('manager/kot_kab') ?>',
            data: 'nm_kot_kab=' + nm_kot_kab,
            success: function(response) {
                $('#kecamatan_baru').html(response);
            }
        });
    });

    $('#kecamatan_baru').change(function() {
        var nm_kecamatan = $(this).val();
        $.ajax({
            type: 'POST',
            url: '<?= base_url('manager/kecamatan') ?>',
            data: 'nm_kecamatan=' + nm_kecamatan,
            success: function(response) {
                $('#dk_ds').html(response);
            }
        });
    });
</script>