I am currently working on a project where I need to dynamically add HTML tags using JavaScript. However, I have noticed that the themes or styles are not being applied to the newly added elements within the append method. In my HTML file, I am using jQuery Mobile CSS and JS for styling. Below is an excerpt from my JavaScript file:
var callback;
function call(uid,pw) {
callback=true;
$.getJSON("json.jsp" + "?uid=" + uid + "&rdm=" + Math.random(),
function(data){
var arr=data.menu.split(",");
$("#cont").empty();
$.each( arr, function( key, val ) {
$( "#cont").append("<ul data-role='listview' data-divider-theme='b' data-inset='true'><li data-theme='c'><a href='#page1' data-transition='slide'>" + val + "</a></li></ul>");
});
callback=false;
}
);
}