itemClick

Fires when the user clicks an item in the Kendo UI Drawer.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.item jQuery

The clicked item element.

e.dataItem Object

The item configuration object for generated items. When the Drawer uses the top-level template option, e.dataItem is undefined.

e.sender kendo.ui.Drawer

The widget instance which fired the event.

Example - subscribe to the "itemClick" event during initialization

<div id="drawer">
    <div>Content area content.</div>
</div>
<script>
    $("#drawer").kendoDrawer({
        mode: "push",
        position: "left",
        items: [
            { text: "Home", icon: "home" },
            { text: "Settings", icon: "gear" }
        ],
        itemClick: function(e) {
            alert("Clicked: " + e.dataItem.text);
        }
    });
</script>

Example - subscribe to the "itemClick" event after initialization

<div id="drawer-after-init">
    <div>Content area content.</div>
</div>
<script>
    var drawer = $("#drawer-after-init").kendoDrawer({
        mode: "push",
        position: "left",
        items: [
            { text: "Projects", icon: "folder" },
            { text: "Team", icon: "user" }
        ]
    }).data("kendoDrawer");

    drawer.bind("itemClick", function(e) {
        alert("Clicked element text: " + $.trim(e.item.text()));
    });
</script>
In this article
itemClick
Not finding the help you need?
Contact Support