I am adding rows to a JQ Mobile table based on a JSON string that I am getting from the server.
The first time I go to the page after a refresh, none of the styling is added, however everything works fine everytime after that.
Is there a way to refresh/initialize a table as you can for listviews?
The code below is where I am adding the rows:
$.each(result, function() {
var imgString;
if(result[i]["status"] == 'Y') {
imgString = '<img src= images/checkMark.png height=\"40\" width=\"40\" align=\"middle\">';
} else {
imgString = '';
}
$('#pickupTable > tbody:last').append('<tr><td class=\"tableRow10\">' + imgString +
'<td class=\"tableRow80\"><a><button class=\"selectPickup\" pickupCode = \"'+
result[i]["id"] + '\"> '+ result[i]["address"] +'</button></a></td></tr>');
i++;
});
$('#pickupTable > tfoot:last').append('<tr><td colspan="5">Total Pick Ups: '
+result.length + '</td></tr>');