Json 如何为jquery mobile中动态创建的listview添加移动到其他页面的事件?

Json 如何为jquery mobile中动态创建的listview添加移动到其他页面的事件?,json,html,listview,jquery-mobile,jquery-templates,Json,Html,Listview,Jquery Mobile,Jquery Templates,使用下面的代码,我已经在listview中插入了数据 var renderItemElement = function(item) { return $.tmpl("<li><a>${text}</a></li>", item) .data("item", item) .insertAfter(listHeaders[item.priority]); }; 如果您有一个href,或者您希望整个内容显

使用下面的代码,我已经在listview中插入了数据

var renderItemElement = function(item) {

    return $.tmpl("<li><a>${text}</a></li>", item)
        .data("item", item)
        .insertAfter(listHeaders[item.priority]);   
};

如果您有一个href,或者您希望整个内容显示为listview,则需要使用
.listview()
方法。如果ul标签已经存在并且是listview,请使用
.listview('refresh')

要使用javascript而不是href移动到另一个页面,您需要使用

$.mobile.changePage()

$("#bankList").delegate("li.item", "click", function() {
   model.remove($(this).data("item"));
    $(this).slideUp(function() {
       $(this).remove();
    });
});