I have a dynamically generated select
tag and then after that, I have to make an ajax call to query some values and loop thru it and dynamically generate the options
tag. But for some reason, I cant append an option
tag to my select tag. This is not the issue of asynchronicity right?
const firstElemTd = $('#none td:first-child');
firstElemTd.append(`<select id="the-select"></select>`);
const selectTag = $(`#the-select`);
$.ajax({
method: 'GET',
url: url,
dataType: 'json',
success: function(response) {
$.each(response, function(key, balyu) {
selectTag.append($('<option>', {value: balyu.name}).text(balyu.name));
});
}
});