items.toggle Function
Specifies the toggle event handler of the button. Applicable only for commands of type button
and togglable: true
.
Example
<div id="toolbar"></div>
<script>
$("#toolbar").kendoToolBar({
items: [
{
type: "button",
text: "Foo",
togglable: true,
toggle: function() {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log("toggle!");
}
}
]
});
</script>