.checked
Description Get the checked state of the first element or set the state for all matched elements.
Parameters
state(Boolean, optional): True to check, false to uncheck.
Returns
- (Boolean): Current state (if getter).
- (jBase): Current instance (if setter).
Example
if ($('#agree').checked()) {
// do something
}
$('#agree').checked(true);
.selected
Description Get the selected state of an option or set it.
Parameters
state(Boolean, optional): True to select, false to deselect.
Returns
- (Boolean): Current state (if getter).
- (jBase): Current instance (if setter).
Example
$('option[value="de"]').selected(true);
.disabled
Description Get the disabled state of an element or set it.
Parameters
state(Boolean, optional): True to disable, false to enable.
Returns
- (Boolean): Current state (if getter).
- (jBase): Current instance (if setter).
Example
$('button').disabled(true);
.check
Description
Alias for .checked(true). Checks all matched checkboxes or radio buttons.
Parameters
- None.
Returns
- (jBase): Current instance for chaining.
Example
$('.terms-checkbox').check();
.uncheck
Description
Alias for .checked(false). Unchecks all matched checkboxes or radio buttons.
Parameters
- None.
Returns
- (jBase): Current instance for chaining.
Example
$('.optional-options').uncheck();
.select
Description
Alias for .selected(true). Selects the matched <option> elements in a dropdown.
Parameters
- None.
Returns
- (jBase): Current instance for chaining.
Example
$('select#country option[value="DE"]').select();
.disable
Description
Alias for .disabled(true). Disables the matched form fields or buttons and automatically adds the .disabled CSS class.
Parameters
- None.
Returns
- (jBase): Current instance for chaining.
Example
$('#submit-btn').disable();
.enable
Description
Alias for .disabled(false). Enables the matched form fields or buttons and automatically removes the .disabled CSS class.
Parameters
- None.
Returns
- (jBase): Current instance for chaining.
Example
$('#submit-btn').enable();
Home
A-Z Index
B
C
D
E
F
G
- .get
- .getText
L
M
P
R
- .ready
- .remove
- .remove
- $.data.remove.all (Array)
- $.data.remove.all (Object)
- $.data.remove.at (Array)
- $.data.remove.at (Object)
- $.data.remove.byKey (Array)
- $.data.remove.by.Key (Object)
- $.data.remove.byMatch (Array)
- $.data.remove.byMatch (Object)
- $.data.remove.byValue (Array)
- $.data.remove.byValue (Object)
- $.data.remove.first (Array)
- $.data.remove.first (Object)
- $.data.remove.last (Array)
- $.data.remove.last (Object)
- .removeAttr
- .removeClass
- .replaceWith
- .replaceWithClone