I have a challenge with generating text fields using jquery while applying jquery ui styling to the form. The issue is that the dynamically created elements do not inherit the css styles from jquery ui:
let index = 0;
$('#btn_generate').on('click', function(){
let tr = $("<tr>").appendTo('#tbl_body');
let td = $("<td>").appendTo(tr);
let label = $("<label>").attr({'for' : index}).appendTo(td).html('content' + index + ':').css({'color' : 'white'});
$("<input>").attr({'type' : 'text', 'name' : 'field[]', 'id' : index}).appendTo(td);
index++;
});
Any ideas on how to resolve this issue?