Skip to content

Commit 3cd0f73

Browse files
committed
Corrects markdown spacing in readme
1 parent dc0b185 commit 3cd0f73

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

README.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
#jQuery Form [![Build Status](https://travis-ci.org/jquery-form/form.svg?branch=master)](https://travis-ci.org/jquery-form/form)
1+
# jQuery Form [![Build Status](https://travis-ci.org/jquery-form/form.svg?branch=master)](https://travis-ci.org/jquery-form/form)
22

3-
##Overview
3+
## Overview
44
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

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

8-
##Community
8+
## Community
99
Want to contribute to jQuery Form? Awesome! See [CONTRIBUTING](CONTRIBUTING.md) for more information.
1010

11-
###Code of Conduct
11+
### Code of Conduct
1212
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to ensure that this project is a welcoming place for **everyone** to contribute to. By participating in this project you agree to abide by its terms.
1313

14-
##Requirements
14+
## Requirements
1515
Requires jQuery 1.7 or later. Compatible with jQuery 2.x and 3.x.
1616

17-
##Download
17+
## Download
1818
* **Development:** [src/jquery.form.js
1919
](https://github.com/jquery-form/form/blob/master/src/jquery.form.js)
2020
* **Production/Minified:** [dist/jquery.form.min.js
2121
](https://github.com/jquery-form/form/blob/master/dist/jquery.form.min.js)
2222

23-
###CDN
23+
### CDN
2424
```html
2525
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.1.0/jquery.form.min.js" integrity="sha384-pg7GKHZrgICSnX14mRuztzbN1Bm75xUKyCyzDCUbkOp0nHzgGYqiLsc6XpflqxAc" crossorigin="anonymous"></script>
2626
```
@@ -31,9 +31,9 @@ or
3131

3232
---
3333

34-
##API
34+
## API
3535

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

@@ -46,7 +46,7 @@ xhr.done(function() {
4646
});
4747
````
4848

49-
###ajaxForm( options )
49+
### ajaxForm( options )
5050
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.
5151
Use ajaxForm when you want the plugin to manage all the event binding for you.
5252

@@ -57,7 +57,7 @@ $('form').ajaxForm({
5757
});
5858
````
5959

60-
###ajaxSubmit( options )
60+
### ajaxSubmit( options )
6161
Immediately submits the form via AJAX. In the most common use case this is invoked in response to the user clicking a submit button on the form.
6262
Use ajaxSubmit if you want to bind your own submit handler to the form.
6363

@@ -73,10 +73,10 @@ $('form').on('submit', function(e) {
7373

7474
---
7575

76-
##Options
76+
## Options
7777
**Note:** All standard [$.ajax](http://api.jquery.com/jQuery.ajax) options can be used.
7878

79-
###beforeSerialize
79+
### beforeSerialize
8080
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.
8181

8282
````javascript
@@ -85,7 +85,7 @@ beforeSerialize: function($form, options) {
8585
}
8686
````
8787

88-
###beforeSubmit
88+
### beforeSubmit
8989
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.
9090

9191
````javascript
@@ -96,7 +96,7 @@ beforeSubmit: function(arr, $form, options) {
9696
}
9797
````
9898

99-
###filtering
99+
### filtering
100100
Callback function invoked before processing fields. This provides a way to filter elements.
101101

102102
````javascript
@@ -107,24 +107,24 @@ filtering: function(el, index) {
107107
}
108108
````
109109

110-
###clearForm
110+
### clearForm
111111
Boolean flag indicating whether the form should be cleared if the submit is successful
112112

113-
###data
113+
### data
114114
An object containing extra data that should be submitted along with the form.
115115

116116
````
117117
data: { key1: 'value1', key2: 'value2' }
118118
````
119119

120-
###dataType
120+
### dataType
121121
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:
122122

123123
* 'xml': server response is treated as XML and the 'success' callback method, if specified, will be passed the responseXML value
124124
* 'json': server response will be evaluted and passed to the 'success' callback, if specified
125125
* 'script': server response is evaluated in the global context
126126

127-
###delegation
127+
### delegation
128128
true to enable support for event delegation
129129
*requires jQuery v1.7+*
130130

@@ -135,97 +135,97 @@ $('form').ajaxForm({
135135
});
136136
````
137137

138-
###error
138+
### error
139139
Callback function to be invoked upon error.
140140

141-
###forceSync
141+
### forceSync
142142
Only applicable when explicity using the iframe option or when uploading files on browses that don't support XHR2.
143143
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..."
144144

145-
###iframe
145+
### iframe
146146
Boolean flag indicating whether the form should *always* target the server response to an iframe instead of leveraging XHR when possible.
147147

148-
###iframeSrc
148+
### iframeSrc
149149
String value that should be used for the iframe's src attribute when an iframe is used.
150150

151-
###iframeTarget
151+
### iframeTarget
152152
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.
153153

154-
###replaceTarget
154+
### replaceTarget
155155
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.
156156

157-
###resetForm
157+
### resetForm
158158
Boolean flag indicating whether the form should be reset if the submit is successful
159159

160-
###semantic
160+
### semantic
161161
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"`.
162162

163-
###success
163+
### success
164164
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 standard jQuery arguments:
165165

166166
1. `data`, formatted according to the dataType parameter or the dataFilter callback function, if specified
167167
2. `textStatus`, string
168168
3. `jqXHR`, object
169169
4. `$form` jQuery object containing form element
170170

171-
###target
171+
### target
172172
Identifies the element(s) in the page to be updated with the server response. This value may be specified as a jQuery selection string, a jQuery object, or a DOM element.
173173

174-
###type
174+
### type
175175
The method in which the form data should be submitted, 'GET' or 'POST'.
176176

177-
###uploadProgress
177+
### uploadProgress
178178
Callback function to be invoked with upload progress information (if supported by the browser). The callback is passed the following arguments:
179179

180180
1. event; the browser event
181181
2. position (integer)
182182
3. total (integer)
183183
4. percentComplete (integer)
184184

185-
###url
185+
### url
186186
URL to which the form data will be submitted.
187187

188188
---
189189

190-
##Utility Methods
191-
###formSerialize
190+
## Utility Methods
191+
### formSerialize
192192
Serializes the form into a query string. This method will return a string in the format: `name1=value1&name2=value2`
193193

194194
````javascript
195195
var queryString = $('#myFormId').formSerialize();
196196
````
197197

198-
###fieldSerialize
198+
### fieldSerialize
199199
Serializes field elements into a query string. This is handy when you need to serialize only part of a form. This method will return a string in the format: `name1=value1&name2=value2`
200200

201201
````javascript
202202
var queryString = $('#myFormId .specialFields').fieldSerialize();
203203
````
204204

205-
###fieldValue
205+
### fieldValue
206206
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.
207207

208-
###resetForm
208+
### resetForm
209209
Resets the form to its original state by invoking the form element's native DOM method.
210210

211-
###clearForm
211+
### clearForm
212212
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.
213213

214-
###clearFields
214+
### clearFields
215215
Clears selected field elements. This is handy when you need to clear only a part of the form.
216216

217217
---
218218

219-
##File Uploads
219+
## File Uploads
220220
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)
221221

222222
---
223223

224-
##Contributors
224+
## Contributors
225225
This project has transferred from [github.com/malsup/form](https://github.com/malsup/form/), courtesy of [Mike Alsup](https://github.com/malsup).
226226
See [CONTRIBUTORS](CONTRIBUTORS.md) for details.
227227

228-
##License
228+
## License
229229

230230
This project is dual licensed under the MIT and LGPLv3 licenses:
231231

0 commit comments

Comments
 (0)