I have the following code to display JSON results from an AJAX request as an unordered list. It works well enough in Safari but on Mobile Safari on the iPhone the raw data displays but the UL does not. In fact the for loop isn't triggered.
$("#results").append(data);
var songdata = JSON.parse(data);
var i = 0;
for (i=0;i<=songdata.total;i++)
{
alert(i);
var songhtml = "<ul><li><img src=\"" + songdata.data[i].artwork + "\" /></li><li>" + songdata.data[i].title + "</li><li>" + songdata.data[i].artist + "</li><li>" + songdata.data[i].length + "</li><li>" + songdata.data[i].listen + "</li></ul>";
$("#results").append(songhtml);
}
I expect it's to do with an error of mine, thank you in advance...
Ben