{"size": 2034, "ext": "js", "max_stars_repo_path": "assets/js/custom.js", "max_stars_repo_name": "small-project/daviDev", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/custom.js", "max_issues_repo_name": "small-project/daviDev", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/custom.js", "max_forks_repo_name": "small-project/daviDev", "max_forks_repo_forks_event_min_datetime": "2018-04-02T05:41:25.000Z", "max_forks_repo_forks_event_max_datetime": "2018-04-02T05:41:25.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 30.8181818182, "max_line_length": 116, "alphanum_fraction": 0.4331366765}
$(document).ready(function() {
    $('#ProvinsiCorporate').on('change', function(e) {
        e.preventDefault();
        var id = $(this).find("option:selected");
        var value = id.val();
        var text = id.text();

        $.ajax({
            url: '../php/ajax/states.php?type=provinsi',
            type: 'post',
            data: 'id=' + value,

            success: function(msg) {
                console.log(msg);
                $('#KotaCorporate').empty();

                $.each(msg, function(index, value) {
                    $('#KotaCorporate').append('<option value="' + value.id + '">' + value.name + '</option>');
                })
            }
        });
    })

    $('#KotaCorporate').on('change', function(e) {
        e.preventDefault();
        var id = $(this).find("option:selected");
        var value = id.val();
        var text = id.text();

        $.ajax({
            url: '../php/ajax/states.php?type=kota',
            type: 'post',
            data: 'id=' + value,

            success: function(msg) {
                console.log(msg);
                $('#kecamatanCorporate').empty();

                $.each(msg, function(index, value) {
                    $('#kecamatanCorporate').append('<option value="' + value.id + '">' + value.name + '</option>');
                })
            }
        });
    })
    $('#kecamatanCorporate').on('change', function(e) {
        e.preventDefault();
        var id = $(this).find("option:selected");
        var value = id.val();
        var text = id.text();

        $.ajax({
            url: '../php/ajax/states.php?type=kecamatan',
            type: 'post',
            data: 'id=' + value,

            success: function(msg) {
                console.log(msg);
                $('#kelurahanCorporate').empty();

                $.each(msg, function(index, value) {
                    $('#kelurahanCorporate').append('<option value="' + value.id + '">' + value.name + '</option>');
                })
            }
        });
    })
})