Skip to content

Commit f16f79e

Browse files
committed
- Prefer const and shorthand in docs
1 parent 12e04ab commit f16f79e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ The jqXHR object is stored in element <em>data</em>-cache with the <code>jqxhr</
4747
call. It can be accessed like this:
4848

4949
````javascript
50-
var form = $('#myForm').ajaxSubmit({ /* options */ });
51-
var xhr = form.data('jqxhr');
50+
const form = $('#myForm').ajaxSubmit({ /* options */ });
51+
const xhr = form.data('jqxhr');
5252

5353
xhr.done(function() {
5454
...
@@ -216,14 +216,14 @@ URL to which the form data will be submitted.
216216
Serializes the form into a query string. This method will return a string in the format: `name1=value1&name2=value2`
217217

218218
````javascript
219-
var queryString = $('#myFormId').formSerialize();
219+
const queryString = $('#myFormId').formSerialize();
220220
````
221221

222222
### fieldSerialize
223223
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`
224224

225225
````javascript
226-
var queryString = $('#myFormId .specialFields').fieldSerialize();
226+
const queryString = $('#myFormId .specialFields').fieldSerialize();
227227
````
228228

229229
### fieldValue

0 commit comments

Comments
 (0)