The only dependency is jQuery itself.
jQuery Form Plugin is compatible with jQuery v1.7.2 and later, including jQuery 2.x.x and 3.x.x.
Yes! See our comparison page for a look at how jQuery Form Plugin compares to other libraries (including Prototype and dojo).
The ajaxForm
method provides the simplest way to enable your HTML form to use AJAX. It's the one-stop-shopping method for preparing forms.
There are two main differences between these methods:
ajaxSubmit
submits the form,ajaxForm
does not. When you invokeajaxSubmit
it immediately serializes the form data and sends it to the server. When you invokeajaxForm
it adds the necessary event listeners to the form so that it can detect when the form is submitted by the user. When this occursajaxSubmit
is called for you.- When using
ajaxForm
the submitted data will include the name and value of the submitting element (or its click coordinates if the submitting element is an image).
You can prevent a form from being submitted by adding a 'beforeSubmit' callback function and returning false from that function. See the Code Samples page for an example.
Yes! jQuery Form Plugin has an extensive set of tests that are used to validate its functionality.
Run unit tests
Yes!
jQuery Form serialization adheres closely to the HTML spec. Only successful controls are valid for submission.
Demo