enable

Enables (true) or disables (false) the specified item(s) of the PanelBar.

Example

<ul id="panelbar">
    <li id="item1">Item 1
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
    <li id="item2">Item 2
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
</ul>
<script>
    $("#panelbar").kendoPanelBar();
    // access an existing PanelBar instance
    var panelBar = $("#panelbar").data("kendoPanelBar");
    // enable the item of the PanelBar with ID, "item1"
    panelBar.enable($("#item1"), true);
    // disable the currently selected item of the PanelBar
    var item = panelBar.select();
    panelBar.enable($("#item2"), false);
    // disable all list items that start with ID, "item"
    panelBar.enable($('[id^="item"]'), false);
</script>

Parameters

element String|Element|jQuery

The PanelBar item(s) to be enabled (true) or disabled (false), expressed as a string containing a selector expression or represented by a jQuery selector.

enable Boolean

The desired state - enabled (true) or disabled (false) - of the target element(s).

In this article