toolbar.items.toggleFunction
Specifies the toggle event handler of the button. Applicable only for commands of type button and togglable: true.
Example
<div id="pdfviewer"></div>
<script type="module">
$("#pdfviewer").kendoPDFViewer({
toolbar: {
items: [
{
type: "button",
text: "Toggle",
togglable: true,
toggle: function(e) {
console.log("Toggle state: " + e.checked);
}
},
"pager"
]
},
pdfjsProcessing: {
file: {
url: "https://demos.telerik.com/kendo-ui/content/web/pdfViewer/sample.pdf"
}
}
});
</script>
In this article