Skip to content

Commit 887ee0a

Browse files
authored
Merge pull request jquery-form#565 from NaveenDA/patch-1
Docs typo fix 📖
2 parents b63dd67 + 4d6500a commit 887ee0a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# jQuery Form [![Build Status](https://travis-ci.org/jquery-form/form.svg?branch=master)](https://travis-ci.org/jquery-form/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 allow you to have full control over how the data is submitted.
55

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

@@ -13,7 +13,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C
1313

1414
### Pull Requests Needed
1515
#### Enhancements needed to to be fully compatible with jQuery 3
16-
jQuery 3 is removing a lot of features that have been depreciated for a long time. Some of these are still in use by jQuery Form.
16+
jQuery 3 is removing a lot of features that have been deprecated for a long time. Some of these are still in use by jQuery Form.
1717
Pull requests and assistance in updating jQuery Form to be compatible with jQuery 3 are greatly appreciated.
1818
See [issue #544](https://github.com/jquery-form/form/issues/544) for more information.
1919

@@ -62,7 +62,7 @@ Use ajaxForm when you want the plugin to manage all the event binding for you.
6262
````javascript
6363
// prepare all forms for ajax submission
6464
$('form').ajaxForm({
65-
target: '#myResultsDiv'
65+
target: '#myResultsDiv'
6666
});
6767
````
6868

@@ -73,10 +73,10 @@ Use ajaxSubmit if you want to bind your own submit handler to the form.
7373
````javascript
7474
// bind submit handler to form
7575
$('form').on('submit', function(e) {
76-
e.preventDefault(); // prevent native submit
77-
$(this).ajaxSubmit({
78-
target: '#myResultsDiv'
79-
})
76+
e.preventDefault(); // prevent native submit
77+
$(this).ajaxSubmit({
78+
target: '#myResultsDiv'
79+
})
8080
});
8181
````
8282

@@ -86,7 +86,7 @@ $('form').on('submit', function(e) {
8686
**Note:** All standard [$.ajax](http://api.jquery.com/jQuery.ajax) options can be used.
8787

8888
### beforeSerialize
89-
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.
89+
Callback function invoked before 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.
9090

9191
````javascript
9292
beforeSerialize: function($form, options) {
@@ -95,7 +95,7 @@ beforeSerialize: function($form, options) {
9595
````
9696

9797
### beforeSubmit
98-
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.
98+
Callback function invoked before 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.
9999

100100
````javascript
101101
beforeSubmit: function(arr, $form, options) {
@@ -110,9 +110,9 @@ Callback function invoked before processing fields. This provides a way to filte
110110

111111
````javascript
112112
filtering: function(el, index) {
113-
if ( !$(el).hasClass('ignore') ) {
114-
return el;
115-
}
113+
if ( !$(el).hasClass('ignore') ) {
114+
return el;
115+
}
116116
}
117117
````
118118

@@ -130,7 +130,7 @@ data: { key1: 'value1', key2: 'value2' }
130130
Expected data type of the response. One of: null, 'xml', 'script', or 'json'. The dataType option provides a means for specifying how the server response should be handled. This maps directly to jQuery's dataType method. The following values are supported:
131131

132132
* 'xml': server response is treated as XML and the 'success' callback method, if specified, will be passed the responseXML value
133-
* 'json': server response will be evaluted and passed to the 'success' callback, if specified
133+
* 'json': server response will be evaluated and passed to the 'success' callback, if specified
134134
* 'script': server response is evaluated in the global context
135135

136136
### delegation
@@ -149,8 +149,8 @@ $('form').ajaxForm({
149149
Callback function to be invoked upon error.
150150

151151
### forceSync
152-
Only applicable when explicity using the iframe option or when uploading files on browses that don't support XHR2.
153-
Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates prior to performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."
152+
Only applicable when explicity using the iframe option or when uploading files on browsers that don't support XHR2.
153+
Set to `true` to remove the short delay before posting form when uploading files. The delay is used to allow the browser to render DOM updates before performing a native form submit. This improves usability when displaying notifications to the user, such as "Please Wait..."
154154

155155
### iframe
156156
Boolean flag indicating whether the form should *always* target the server response to an iframe instead of leveraging XHR when possible.
@@ -159,19 +159,19 @@ Boolean flag indicating whether the form should *always* target the server respo
159159
String value that should be used for the iframe's src attribute when an iframe is used.
160160

161161
### iframeTarget
162-
Identifies the iframe element to be used as the response target for file uploads. By default, the plugin will create a temporary iframe element to capture the response when uploading files. This options allows you to use an existing iframe if you wish. When using this option the plugin will make no attempt at handling the response from the server.
162+
Identifies the iframe element to be used as the response target for file uploads. By default, the plugin will create a temporary iframe element to capture the response when uploading files. This option allows you to use an existing iframe if you wish. When using this option the plugin will not attempt handling the response from the server.
163163

164164
### method
165165
The HTTP method to use for the request (e.g. 'POST', 'GET', 'PUT').
166166

167167
### replaceTarget
168-
Optionally used along with the the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.
168+
Optionally used along with the target option. Set to true if the target should be replaced or false if only the target contents should be replaced.
169169

170170
### resetForm
171171
Boolean flag indicating whether the form should be reset if the submit is successful
172172

173173
### semantic
174-
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"`.
174+
Boolean flag indicating whether data must be submitted in strict semantic order (slower). Note that the normal form serialization is done in semantic order except for 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"`.
175175

176176
### success
177177
**Deprecated**
@@ -232,7 +232,7 @@ Clears selected field elements. This is handy when you need to clear only a part
232232
---
233233

234234
## File Uploads
235-
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)
235+
The Form Plugin supports the 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)
236236

237237
---
238238

@@ -242,7 +242,7 @@ See [CONTRIBUTORS](CONTRIBUTORS.md) for details.
242242

243243
## License
244244

245-
This project is dual licensed under the LGPLv2.1 (or later) or MIT licenses:
245+
This project is dual-licensed under the LGPLv2.1 (or later) or MIT licenses:
246246

247247
* [GNU Lesser General Public License v2.1](LICENSE)
248248
* [MIT](LICENSE-MIT)

0 commit comments

Comments
 (0)