Brian
Brian

Reputation: 622

how do I show the loading animation when pulling dynamic ajax content? > jquerymobile

When loading normal pages in jquerymobile, I get the nice loading animation, but when I pull from an ajax source, Im not getting the animation and users could get confused that they did not submit the form.

I couldnt find anything to call the animation just from a google search

Upvotes: 0

Views: 1940

Answers (1)

codaniel
codaniel

Reputation: 5253

If you submit your form as you normally would JQM does ajax the form automatically and you get your neat little animation you are referring to. i.e.

<form action="processMyForm.php" method="post">
    ...inputs here
</form>

You also have access to the following methods.

$.mobile.showPageLoadingMsg("b", "This is only a test"); // options are (theme, text, boolean text only)
$.mobile.hidePageLoadingMsg();

Upvotes: 1

Related Questions