HTML.
<div id="listsalon">
<ul data-role="listview" data-inset="true" data-filter="true" >
</ul>
</div>
JS.
for (var i = 0; i < arr.length; i++) {
companyname = arr[i].CompanyName;
picture = arr[i].Picture;
address = arr[i].Address;
$("#listsalon ul").append("<li class='ui-corner-all'>" +
"<a id=" + '"' + "salon" + (i + 1) + '"' + "><img src='" + picture +
"'style='height:160px; width:200px;' class='ui-corner-all'>" +
"<h2 style='font-size:13px'>" + companyname + "</h2>" +
"<p style='font-size:10px'>" + address + "</p>" +
"</a></li>");
}
$("#salon1").bind("click", function () {
window.location = "salon.html"
});
Problem: So first I pull data and put in 3 variables, companyname, picture and address. i have x sets of these data. i want to put in a list form. i am able to list out, but the function doesn't recognise the id and it does not work. please help. ty