2016-04-06 85 views
0

如何使用過濾器初始化列表視圖。我嘗試了以下,它並沒有刪除我之前在listview的搜索字段中輸入的內容。如何使用搜索過濾器初始化列表視圖

$(document).on('pagebeforeshow', '#addLocations', function() { 
    alert("in"); 
    $("citynames").listview(); 
    $("citynames").listview('refresh'); 
}); 

回答

0

找到了答案。以下幾行就是我想要的。

$(document).on('pagebeforeshow', '#addLocations', function() { 
     $('input[data-type="search"]').val(""); 
     $("[data-type=search]").trigger("change"); 
    }); 
相關問題