Fork me on GitHub

jQuery-Patience by RodrigoAyala

A jQuery Plugin to make your users to wait your ajax calls

I was searching a jQuery plugin to show a "loading" div for ajax calls, and I didn't found anything. So after that, I decided to create this plugin. It works out-of-the-box, this means that you don't need to add new stylesheets to the HTML, or add strange configurations.

Dependencies

jQuery (>=1.6.0)

Install

It's simple!, add the plugin to the HTML, and in the HEAD section, add this:

<meta name="patience" content="true">
And that's it!

Anyway, you can customize the loading div, instead of add the meta "patience", call $.patience with some options like:
loading_image: path of the loading icon
message: message that will be shown inside the div, something like "Loading..." or "Wait please..."
height: height of the div
width: width of the div
Or if you want to use your own div:
div_loading: name of the div that you created by your own to be shown.

e.g.:
$.patience({message: "Wait please!",height:200,width:200});

Example

See this example, live!

License

GPLv3

Author

Rodrigo Ayala

Download

You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://github.com/RodrigoAyala/jQuery-Patience

"