or
displayMessage = function (displayTitle, display) { $("<div></div>").kendoWindow({ animation: { open: { effects: "slideIn:left fadeIn", duration: 500 }, close: { effects: "slide:left fadeOut", duration: 500 } }, visible: true, title: displayTitle, modal: true, width: "50%", deactivate: function () { this.element.closest(".k-widget").remove(); } }).data("kendoWindow") .content(display) .center() .open(); }and call the method:
displayMessage("Test", "<label>Hi there</label>");