activate

Triggered when an item of a PanelBar is activated.

Event Data

e.item Element

The activated item of the PanelBar.

Attach activate event handler during initialization; detach via unbind()

<ul id="panelbar">
    <li>Item 1
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
    <li>Item 2
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
</ul>
<script>
    // event handler for activate
    var onActivate = function(e) {
        // access the activated item via e.item (HTMLElement)

        // detach activate event handler via unbind()
        panelBar.data("kendoPanelBar").unbind("activate", onActivate);
    };

    // attach activate event handler during initialization
    var panelBar = $("#panelbar").kendoPanelBar({
        activate: onActivate
    });
</script>

Attach activate event handler via bind(); detach via unbind()

<ul id="panelbar">
    <li>Item 1
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
    <li>Item 2
        <ul>
            <li>Sub Item 1</li>
            <li>Sub Item 2</li>
            <li>Sub Item 3</li>
        </ul>
    </li>
</ul>
<script>
    $("#panelbar").kendoPanelBar();

    // event handler for activate
    var onActivate = function(e) {
        // access the activated item via e.item (HTMLElement)

        // detach activate event handler via unbind()
        $("#panelbar").data("kendoPanelBar").unbind("activate", onActivate);
    };

    // attach activate event handler via bind()
    $("#panelbar").data("kendoPanelBar").bind("activate", onActivate);
</script>
In this article