Phonegap + JQM でオフライン アプリケーションを構築しています。すべてのページ変更イベントで読み込みメッセージが表示されるようにグローバルに設定する可能性はありますか?
3634 次
2 に答える
0
$(document).live('pagebeforehide', function(){
$.mobile.showPageLoadingMsg();
//More stuff to do
});
$(document).live('pageshow', function(){
//More stuff to do
$.mobile.hidePageLoadingMsg();
});
于 2012-06-22T08:28:11.707 に答える
0
ニーマルの答えは私にはうまくいきませんが、個々のページへのバインディングはうまくいきます:
$("div[data-role='page']").live('pagebeforehide', function(){
console.log("showing....");
$.mobile.showPageLoadingMsg();
//More stuff to do
});
$("div[data-role='page']").live('pageshow', function(){
//More stuff to do
console.log("hiding....");
$.mobile.hidePageLoadingMsg();
});
于 2012-09-21T21:26:22.087 に答える