From jQuery JavaScript Library
« Back to Plugins/Validation
removeAttrs( attributes )
Remove the specified attributes from the first matched element and return them.
Arguments:| attributes | String | |
|---|
| A space-seperated list of attribute names to remove. |
Examples:| Name | Type |
Usage of removeAttrs to remove rules, specified via attributes, from an element, submit its form - triggering the form validation - then add those rules back in case the form was invalid and gets a normal submit.
$("#skip").click(function() {
var rules = $("#myinput").removeAttrs("min max");
$("#myform).submit();
$("#myinput").attr(rules);
});