-
Notifications
You must be signed in to change notification settings - Fork 0
Clear Form
Gray edited this page Sep 14, 2016
·
1 revision
Description: Clear the values of input elements except button elements, change the values into "" or remove checked or selected.
Type: Integer | Default: -1
Default selected index of select elements when clearing inputs.
$('form').clearForm({
defaultSelectedIndex : 0
});
//or
$('select').clearForm({
defaultSelectedIndex : 0
});
Triggered after all inputs in the form or the block was seleted were cleared.
-
event
Type: Event -
ui
Type: Object
- **item**
Type: jQuery
The cleared block.
Note: The event object is empty but included for consistency with other events.
$('form').clearForm({
cleared : function(event, ui) { }
}});
Triggered after a input was cleared.
-
event
Type: Event -
ui
Type: Object
- **item**
Type: jQuery
The cleared input.
Note: The event object is empty but included for consistency with other events.
$('form').clearForm({
itemCleared : function(event, ui) { }
}});