thanks Katya
thanks Katya
Quick question...(if I may) is it possible to show how to append to an existing list as oppose to creating a new one each time.
In the example above I'm getting a new list built each time I call this code. So I get "filter items" appearing multiple times under each other.
thanks
Hi, you can add/delete list elements, but it's easier to delete list and create new one:
codevar data = ["Tinker", "Tailor", "Solder", "Spy"];
var listHtml = '<ul id="newList" data-role="listview">';
if ($('#newList').size() > 0) {
$('#newList').remove();
}
for(var i=0; i<data.length; i++)
{
listHtml += '<li><a href="#">'+data+'</a></li>';
}
listHtml += '</ul>';
var listElement = $(listHtml);
Appery('mobilecontainer1').append(listElement);
listElement.listview();/code
I've built the list now based on a generic service which has resolved this funny.
Glad it's working ![]()