I have the following code:
Then after it, I have:
Basically, once the page is loaded, I can no longer open the window, regardless of whether it was opened on document ready event or not. I do not understand why the $("#window").data("kendoWindow") object is undefined.
<section> @(Html.Kendo().Window() .Modal(true) .Name("window") .Height(200) .Width(400) .Title("Case Documents") .Visible(false) .LoadContentFrom("Index", "Home") .Pinned(true) ) <a id="openButton">Open Window</a>Then after it, I have:
// this works when the page is loaded $(function () { $("#window").data("kendoWindow").center().open(); });// this does not work, even if I remove the above code, it says $(...).data(...) is undefined $($("#openButton").click(function () { $("#window").data("kendoWindow").center().open(); }));