I'm building offline application with Phonegap + JQM. Is there any possibility to set globally that on every page change event would showing loading message?
Jquery mobile. Loading message on page change
3.6k Views Asked by Robertas Setkus At
2
There are 2 best solutions below
0
On
Nirmal's answer doesn't work for me, but binding to the individual pages does:
$("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();
});