2012-03-17 114 views

回答

1

reloadPage布爾,默認:FALSE)

強制頁面重新加載,即使它已經在 頁容器的DOM。僅在changePage()的「to」參數爲 URL時使用。

來源:http://jquerymobile.com/demos/1.1.0-rc.1/docs/api/methods.html

因此,基本上可以用$.mobile.changePage()改變網頁,你可以通過它的preloadPage : true選項時要重新加載的URL。

下面是如何使用$.mobile.changePage()對於具有reload類鏈接一個簡單的例子:

$(document).delegate('a.reload', 'click', function() { 
    $.mobile.changePage('myPage.html', { reloadPage : true }); 
    return false; 
}); 
+0

謝謝你的回答。在鏈接頁面時,jquerymobile中的默認加載器不會出現 – user969275 2012-03-19 04:53:54

1

,同時鏈接到的網頁,通過添加以下代碼jQuery Mobile的默認加載器出現:

$("a").click(function() { 
    $.mobile.showPageLoadingMsg(); 
    //Other things you want to do 
});