I am working on a JQuery Mobile app. I am dynamically adding HTML when the page loads. A trimmed down example is shown here:
var h = "";
for (i=1; i<=5; i++) {
h += "<div>Entry #" + i + "</div>";
h += "<div class='ui-grid-a'>";
h += "<div class='ui-block-a'><input type='button' value='Approve' onclick='return approveButton_Click(this);' /></div>";
h += "<div class='ui-block-b'><input type='button' value='Reject' onclick='return rejectAbuse_Click(this);' /></div>";
h += "</div><hr />";
});
$("#entries", "#myPage").append(h);
My HTML is appearing in the UI. However, the buttons are not rendered as a typical JQuery Mobile buttons. Instead, they look like traditional HTML buttons. How do I get my dynamically added buttons to apply the JQuery mobile styling?
Thank you