Skip to content

Commit

Permalink
- Prefer const and shorthand in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jul 10, 2020
1 parent 12e04ab commit f16f79e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ The jqXHR object is stored in element <em>data</em>-cache with the <code>jqxhr</
call. It can be accessed like this:

````javascript
var form = $('#myForm').ajaxSubmit({ /* options */ });
var xhr = form.data('jqxhr');
const form = $('#myForm').ajaxSubmit({ /* options */ });
const xhr = form.data('jqxhr');

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

````javascript
var queryString = $('#myFormId').formSerialize();
const queryString = $('#myFormId').formSerialize();
````

### fieldSerialize
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`

````javascript
var queryString = $('#myFormId .specialFields').fieldSerialize();
const queryString = $('#myFormId .specialFields').fieldSerialize();
````

### fieldValue
Expand Down

0 comments on commit f16f79e

Please sign in to comment.