toggle

Toggles the state of a specified pane (i.e. collapsed or expanded). Invoking this method will force the widget to redraw and it will trigger the resize event. Note: Invoking the method will not trigger collapse or expand events.

Parameters

pane String|Element|jQuery

The pane to be collapsed.

expand Boolean (optional)

Represents the desired state of the specified pane; to be expanded (true) or collapsed (false). If undefined, toggle() will collapse the pane if it is expanded or will expand the pane if it is collapsed.

Example

<div id="splitter">
  <div id="pane1">Pane A</div>
  <div>Pane B</div>
</div>
<script>
$("#splitter").kendoSplitter({
  panes: [ { collapsible: true }, { collapsible: true } ]
});
var splitter = $("#splitter").data("kendoSplitter");

// toggle the pane with id="pane1"
splitter.toggle("#pane1");

// expand the pane with id="pane1"
splitter.toggle("#pane1", true);

// collapse the last pane
splitter.toggle(".k-pane:last", false);
</script>
In this article
Not finding the help you need?