using the below code, I have inserted the data in the listview
var renderItemElement = function(item) {
return $.tmpl("<li><a>${text}</a></li>", item)
.data("item", item)
.insertAfter(listHeaders[item.priority]);
};
and when click it, i can remove the data, but when i click it, i want the data to be passed to the next page. Can anyone help me with this code?
$("#bankList").delegate("li.item", "click", function() {
model.remove($(this).data("item"));
$(this).slideUp(function() {
$(this).remove();
});
});
if your has a href or if you want the whole thing to display as a listview at all, you need to use
.listview()method. If the ul tag already existed and is a listview, use.listview('refresh')to move to another page with javascript, not a href, you need to use
$.mobile.changePage()