Search code examples
jquerykendo-window

open Kendo UI using link?


Hello I try to open window using Kendo ui. I need to click to link or input button. I wrote but link doesn't work. Help please.

<a id="forgett" href="#">Forget</a>
<div id="details"></div>
<script>
    $(document).ready(function () {
        kendo.template($("#my-template").html());
        $("#details").kendoWindow({
            width: "400",
            resizable: false,
            title: "Forget",
            visible: false,
            actions: ["close"]
        }).data("kendoWindow").center();


        $("#forgett").click(function (e) {
            window.data("kendoWindow").open();
        });
    });
</script>
<script id="my-template" type="text/kendo-template">
<div>...</div>
</script>

Solution

  • It appears you never define window.data("kendoWindow") - instead you are defining "kendoWindow" on the DIV's data property. I can't test this on my machine at the moment, but I imagine your onclick would need to call something like:

    $("#forgett").click(function (e) {
                $("#details").data("kendoWindow").open();
    });