# 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.

- Root node 1
  - Child node 1
  - Child node 2
- Root node 2

## 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.

- `mixed` node

  This 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.

- `mixed` node

  This 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.

- `mixed` node

  This can be a DOM node, jQuery node or selector pointing to an element within the tree.

- `boolean` uncheck

  If set to `true` the node is unchecked, if set to `false` the node is checked, otherwise - the state is toggled.

### .check_node ( node )

Checks a node.

- `mixed` node

  This can be a DOM node, jQuery node or selector pointing to an element within the tree.

### .uncheck_node ( node )

Unchecks a node.

- `mixed` node

  This 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.

- `mixed` node

  This 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.

- `mixed` context

  This 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.