Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update readme with code example

  • Loading branch information...
commit a47bfa3c9c7d4c2080f2135ef2282a61121b1fad 1 parent 2b6b25b
@johnkpaul authored
Showing with 12 additions and 7 deletions.
  1. +12 −7
@@ -15,17 +15,22 @@ In your web page:
<script src="dist/jquery.ajax-retry.min.js"></script>
jQuery(function($) {
- $.awesome(); // "awesome"
+ //this will try the ajax call three times in total
+ //if there is no error, the success callbacks will be fired immediately
+ //if there is an error after three attempts, the error callback will be called
+ $.ajax(options).retry(3).then(function(){
+ alert("success!");
+ });
+ //this has the same sematics as above, except will wait 3 seconds between attempts
+ $.ajax(options).withTimeout(3000).retry(3).then(function(){
+ alert("success!");
+ });
-## Documentation
-_(Coming soon)_
-## Examples
-_(Coming soon)_
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](
Please sign in to comment.
Something went wrong with that request. Please try again.