i have `selectbox` and data send by ajax. this html 

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<select id="kode_hanca" onchange="showModel(this)" name="id_vendor_detail[]" class="form-control vendor" required="">
                                    <option value="">- PILIH -</option>
                                    <script>
                                        $("select#kode_hanca").on("click", function () {
                                            $.ajax({
                                                type: "POST",
                                                url: "vendor_inout/vendor_inout_crud.php",
                                                dataType: 'json',
                                                data: {type: "get_kode_hanca"}, //get_kode_hanca
                                                success: function (data) {
                                                    console.log(data);
                                                    var teks = "";
                                                    $.each(data.kode_hanca, function (index, val) { //looping table detail bahan
                                                        var id_vendor_detail = val.id_vendor_detail;
                                                        var kode_hanca = val.kode_hanca;

                                                        teks += "<option class='target_append' value='" + id_vendor_detail + "'>" + kode_hanca + "</option>";
                                                    });
                                                    $("#kode_hanca:last").append(teks);
                                                }
                                            });
                                        });
                                    </script>
                                </select>
```

data is convert to json and always dinamic. So every i select the `selectbox` data must load again. when i use `click` or `change` its not working to send ajax. how to solve it ?