A jQuery plugin to complement jquery-form, making ajax and working with forms as effortless as possible.
- jQuery
- jquery-form
Tells links and forms to make their request via ajax. It assumes the response to be executable JavaScript.
Note that multipart forms are given an additional “format” field set to “js” so that server applications (such as Rails) can respond with JavaScript if desired. The JS response will need to be wrapped in a textarea to be evaluated.
Tells a link (or any other element) to submit a form when clicked (sometimes you just don’t want a submit button). If the link has a target attribute, it will be used as the selector to find the form to submit. Otherwise, the containing form will be submitted.
Tells a select box (or any other element) to submit a form when changed. If the element has a target attribute, it will be used as the selector to find the form to submit. Otherwise, the containing form will be submitted.
This built-in jQuery method has been enhanced to set multiple values in a form. When used on a form it accepts an object and uses the name/value pairs to find and set values in the form.
$('a.ajax, form.ajax').jaxy();
$('a.submit').submitOnClick();
$('select.submit').submitOnChange();
$('#some_form').val({peanut_butter: 'jQuery', jelly: 'Rails'});
bonus points for using jquery-always
$('a.ajax, form.ajax').always().jaxy();
$('a.submit').always().submitOnClick();
$('select.submit').always().submitOnChange();