Skip to content

Linting #583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
- Prefer const and shorthand in docs
  • Loading branch information
brettz9 committed Jul 10, 2020
commit 440eb3c78063e14e84939189534e7ff28d8fe522
16 changes: 8 additions & 8 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 @@ -89,7 +89,7 @@ $('form').on('submit', function(e) {
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.

````javascript
beforeSerialize: function($form, options) {
beforeSerialize ($form, options) {
// return false to cancel submit
}
````
Expand All @@ -98,7 +98,7 @@ beforeSerialize: function($form, options) {
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.

````javascript
beforeSubmit: function(arr, $form, options) {
beforeSubmit (arr, $form, options) {
// form data array is an array of objects with name and value properties
// [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
// return false to cancel submit
Expand All @@ -109,7 +109,7 @@ beforeSubmit: function(arr, $form, options) {
Callback function invoked before form events unbind and bind again. Provides an opportunity to manipulate the form before events will be remounted. The callback is invoked with two arguments: the jQuery wrapped form object and the options object.

````javascript
beforeFormUnbind: function($form, options) {
beforeFormUnbind ($form, options) {
// your callback code
}
````
Expand All @@ -118,7 +118,7 @@ beforeFormUnbind: function($form, options) {
Callback function invoked before processing fields. This provides a way to filter elements.

````javascript
filtering: function(el, index) {
filtering (el, index) {
if ( !$(el).hasClass('ignore') ) {
return el;
}
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy