back to the documentation homepage
jsTree v.1.0 - checkbox plugin
Description
The checkbox plugin makes multiselection possible using three-state checkboxes.
Configuration
No configuration possible
Demos
Using the checkbox plugin - all you need to do is include it in the list of active plugins.
API
The checkbox plugin maps UI's get_selected function to its own get_checked function and overwrites the UI reselect function. It also disables the select_node, deselect_node and deselect_all functions.
._prepare_checkboxes ( node )
Inserts the checkbox icons on the node. Used internally.
-
mixednodeThis can be a DOM node, jQuery node or selector pointing to an element within the tree.
._repair_state ( node )
Repairs the checkbox state inside the node. Used internally.
-
mixednodeThis can be a DOM node, jQuery node or selector pointing to an element within the tree.
.change_state ( node , uncheck )
Changes the state of a node. Used mostly internally - you'd be better off using the check_node and uncheck_node functions. Triggers an event.
-
mixednodeThis can be a DOM node, jQuery node or selector pointing to an element within the tree.
-
booleanuncheckIf set to
truethe node is unchecked, if set tofalsethe node is checked, otherwise - the state is toggled.
.check_node ( node )
Checks a node.
-
mixednodeThis can be a DOM node, jQuery node or selector pointing to an element within the tree.
.uncheck_node ( node )
Unchecks a node.
-
mixednodeThis can be a DOM node, jQuery node or selector pointing to an element within the tree.
.check_all ( )
Checks all nodes.
.uncheck_all ( )
Unchecks all nodes.
.is_checked ( node )
Checks if a node is checked. Returns boolean.
-
mixednodeThis can be a DOM node, jQuery node or selector pointing to an element within the tree.
.get_checked ( context ), .get_unchecked ( context )
Both functions return jQuery collections.
-
mixedcontextThis can be a DOM node, jQuery node or selector pointing to an element within the tree. If specified only nodes inside the specified context are returned, otherwise the whole tree is searched.
.show_checkboxes ( ), .get_unchecked ( )
Show or hide the checkbox icons.