New to Kendo UI for jQuery? Download free 30-day trial

Add Close Button inside Modal Windows

The example below demonstrates how to add a Close button to a modal Kendo UI Window.

    <div id="example">
      <div id="window">
        <button class="k-button close-button">Close</button>
      <button class="k-button open-button">Open window</button>

        $(document).ready(function() {
          var wnd = $("#window");

          $(".open-button").bind("click", function() {

            // call 'close' method on nearest kendoWindow
            // the above is equivalent to:

          if (!"kendoWindow")) {
              modal: true,
              title: "Dialog window",
              close: function() {
              visible: false

See Also

For more runnable examples on the Kendo UI Window, browse the How To documentation folder.

In this article
Not finding the help you need? Improve this article