Skip to content

Commit 2c13432

Browse files
author
Kevin Morris
committed
README formatting
1 parent 2d75614 commit 2c13432

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#jQuery Form
22

33
##Overview
4-
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted.
4+
The jQuery Form Plugin allows you to easily and unobtrusively upgrade HTML forms to use AJAX. The main methods, ajaxForm and ajaxSubmit, gather information from the form element to determine how to manage the submit process. Both of these methods support numerous options which allows you to have full control over how the data is submitted.
55

6-
No special markup is needed, just a normal form. Submitting a form with AJAX doesn't get any easier than this!
6+
No special markup is needed, just a normal form. Submitting a form with AJAX doesn't get any easier than this!
77

88
##Community
99
Want to contribute to jQuery Form? Awesome! See [CONTRIBUTING](CONTRIBUTING.md) for more information.
@@ -25,19 +25,19 @@ Requires jQuery 1.7+.
2525
`<script src="https://cdn.rawgit.com/jquery-form/form/v4.0.0/dist/jquery.form.min.js" integrity="sha384-VbVFC0lW+zWNPASj3BNeyyhq8bfMBuPS/oKvruIvimT8gB9mee2oQtrFarxCzL5m" crossorigin="anonymous"></script>`
2626

2727
* **v3.51.0**
28-
`<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.min.js" integrity="sha384-PtoF94KNPetQqtyWrt7MCIFhajxLf9jnI6qysmzN5x7hcSRpKj7hML3cJi+BgBne" crossorigin="anonymous"></script>`
29-
or
30-
`<script src="https://oss.maxcdn.com/jquery.form/3.51/jquery.form.min.js" integrity="sha384-+MH/JJ/f/MpqUtleUQmbvWeijy4xwPHS7BTjaTaBYGhAvgLxeSQqxDYkainJGDee" crossorigin="anonymous"></script>`
31-
or
32-
`<script src="https://cdn.jsdelivr.net/jquery.form/3.51/jquery.form.min.js" integrity="sha384-+MH/JJ/f/MpqUtleUQmbvWeijy4xwPHS7BTjaTaBYGhAvgLxeSQqxDYkainJGDee" crossorigin="anonymous"></script>`
28+
`<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.min.js" integrity="sha384-PtoF94KNPetQqtyWrt7MCIFhajxLf9jnI6qysmzN5x7hcSRpKj7hML3cJi+BgBne" crossorigin="anonymous"></script>`
29+
or
30+
`<script src="https://oss.maxcdn.com/jquery.form/3.51/jquery.form.min.js" integrity="sha384-+MH/JJ/f/MpqUtleUQmbvWeijy4xwPHS7BTjaTaBYGhAvgLxeSQqxDYkainJGDee" crossorigin="anonymous"></script>`
31+
or
32+
`<script src="https://cdn.jsdelivr.net/jquery.form/3.51/jquery.form.min.js" integrity="sha384-+MH/JJ/f/MpqUtleUQmbvWeijy4xwPHS7BTjaTaBYGhAvgLxeSQqxDYkainJGDee" crossorigin="anonymous"></script>`
3333

3434
---
3535

3636
##API
3737

3838
###jqXHR
3939
The jqXHR object is stored in element <em>data</em>-cache with the <code>jqxhr</code> key after each <code>ajaxSubmit</code>
40-
call. It can be accessed like this:
40+
call. It can be accessed like this:
4141

4242
````javascript
4343
var form = $('#myForm').ajaxSubmit({ /* options */ });
@@ -79,7 +79,7 @@ $('form').on('submit', function(e) {
7979
**Note:** All standard [$.ajax](http://api.jquery.com/jQuery.ajax) options can be used.
8080

8181
###beforeSerialize
82-
Callback function invoked prior to form serialization. Provides an opportunity to manipulate the form before its values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.
82+
Callback function invoked prior to form serialization. Provides an opportunity to manipulate the form before its values are retrieved. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.
8383

8484
````javascript
8585
beforeSerialize: function($form, options) {
@@ -88,13 +88,13 @@ beforeSerialize: function($form, options) {
8888
````
8989

9090
###beforeSubmit
91-
Callback function invoked prior to form submission. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with three arguments: the form data in array format, the jQuery wrapped form object, and the options object.
91+
Callback function invoked prior to form submission. Returning `false` from the callback will prevent the form from being submitted. The callback is invoked with three arguments: the form data in array format, the jQuery wrapped form object, and the options object.
9292

9393
````javascript
9494
beforeSubmit: function(arr, $form, options) {
9595
// form data array is an array of objects with name and value properties
9696
// [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
97-
// return false to cancel submit
97+
// return false to cancel submit
9898
}
9999
````
100100

@@ -163,7 +163,7 @@ Boolean flag indicating whether the form should be reset if the submit is succes
163163
Boolean flag indicating whether data must be submitted in strict semantic order (slower). Note that the normal form serialization is done in semantic order with the exception of input elements of `type="image"`. You should only set the semantic option to true if your server has strict semantic requirements and your form contains an input element of `type="image"`.
164164

165165
###success
166-
Callback function to be invoked after the form has been submitted. If a `success` callback function is provided it is invoked after the response has been returned from the server. It is passed the following arguments:
166+
Callback function to be invoked after the form has been submitted. If a `success` callback function is provided it is invoked after the response has been returned from the server. It is passed the following arguments:
167167

168168
1. responseText or responseXML value (depending on the value of the dataType option).
169169
2. statusText
@@ -205,21 +205,21 @@ var queryString = $('#myFormId .specialFields').fieldSerialize();
205205
````
206206

207207
###fieldValue
208-
Returns the value(s) of the element(s) in the matched set in an array. This method always returns an array. If no valid value can be determined the array will be empty, otherwise it will contain one or more values.
208+
Returns the value(s) of the element(s) in the matched set in an array. This method always returns an array. If no valid value can be determined the array will be empty, otherwise it will contain one or more values.
209209

210210
###resetForm
211211
Resets the form to its original state by invoking the form element's native DOM method.
212212

213213
###clearForm
214-
Clears the form elements. This method emptys all of the text inputs, password inputs and textarea elements, clears the selection in any select elements, and unchecks all radio and checkbox inputs. It does *not* clear hidden field values.
214+
Clears the form elements. This method emptys all of the text inputs, password inputs and textarea elements, clears the selection in any select elements, and unchecks all radio and checkbox inputs. It does *not* clear hidden field values.
215215

216216
###clearFields
217217
Clears selected field elements. This is handy when you need to clear only a part of the form.
218218

219219
---
220220

221221
##File Uploads
222-
The Form Plugin supports use of [XMLHttpRequest Level 2]("http://www.w3.org/TR/XMLHttpRequest/") and [FormData](https://developer.mozilla.org/en/XMLHttpRequest/FormData) objects on browsers that support these features. As of today (March 2012) that includes Chrome, Safari, and Firefox. On these browsers (and future Opera and IE10) files uploads will occur seamlessly through the XHR object and progress updates are available as the upload proceeds. For older browsers, a fallback technology is used which involves iframes. [More Info](http://malsup.com/jquery/form/#file-upload)
222+
The Form Plugin supports use of [XMLHttpRequest Level 2]("http://www.w3.org/TR/XMLHttpRequest/") and [FormData](https://developer.mozilla.org/en/XMLHttpRequest/FormData) objects on browsers that support these features. As of today (March 2012) that includes Chrome, Safari, and Firefox. On these browsers (and future Opera and IE10) files uploads will occur seamlessly through the XHR object and progress updates are available as the upload proceeds. For older browsers, a fallback technology is used which involves iframes. [More Info](http://malsup.com/jquery/form/#file-upload)
223223

224224
---
225225

0 commit comments

Comments
 (0)