Permalink
Browse files

update docs for jqxhr

  • Loading branch information...
1 parent cfd9c57 commit 215f89fe6643e5df1ab034f8a3822543a5fe4080 @malsup malsup committed Sep 29, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.md
View
@@ -9,6 +9,18 @@ No special markup is needed, just a normal form. Submitting a form with AJAX do
##API
+###jqXHR
+The jqXHR object is stored in element <em>data</em>-cache with the <code>jqxhr</code> key after each <code>ajaxSubmit</code>
+call. It can be accessed like this:
+````javascript
+var form = $('#myForm').ajaxSubmit({ /* options */ });
+var xhr = form.data('jqxhr');
+
+xhr.done(function() {
+...
+});
+````
+
###ajaxForm( options )
Prepares a form to be submitted via AJAX by adding all of the necessary event listeners. It does **not** submit the form. Use `ajaxForm` in your document's `ready` function to prepare existing forms for AJAX submission, or with the `delegation` option to handle forms not yet added to the DOM.
Use ajaxForm when you want the plugin to manage all the event binding for you.

0 comments on commit 215f89f

Please sign in to comment.