When using phonegap + jquery mobile, what is the best way to display a small status indicator
to the user while any background ajax query is running?
- It doesn’t need to indicate progress, just show if something is happening or not.
- It needs to handle the case where more than one query is active at the same time and
not leave a hanging indicator if say one of the queries fail and the other one succeds.
i tend to have a div with ID msg, this is placed at the top of the content section, when i make an ajax call i call loading, this loading is simply $(‘#msg’).show(‘slow’); and then when everything is done i then hide, have tried pageLoading but all depends on framework plus i find this does not always seem to work, plus you cant change the text dynamically, were with an ID you can change the html content to say Searching…. or UPloading …. etc but still get the sameeffect.
if your doing jquery mobile i would recommend that you change div data-type=header’ to header tags same with footer and content
and do your own CSS, jquery is terrible at this and performs very badley.
Header
just incase you want to increase performance you will be amazed at how much easier and faster things get when you dont
let jquery run code just because you got a header bar !!!
but hope the advice helps with regards to the loading notices, as phonegap Apps are basically websites its far easier
if you still think web, rather than trying to make an App.
oh and as a fellow phonegap user n jquery mobile if your using live(‘click’ change this to tap massive difference 🙂