Below is a series of events that should run as listed, but I used a timer to delay the events, which is not a good practice, is there a way to run them after each other without the delay timer?
$(".component-select",closestTable).val(parseData.component).trigger("change");
setTimeout(function() {
$(".key-select",closestTable).val(parseData.key).trigger("change");
},1000);
setTimeout(function() {
$.each(parseData.instance, function (dIndex, dValue){
$(".add_instance",closestTable).trigger("click");
$("tbody select:last",closestTable).val(dValue).trigger("change");
});
},1500);