Kendo UI

jQuery + Kendo UI + MockJax

by burkeholland

HTML

<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.blueopal.min.css">
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
<div id="container">
    <button class="k-button">Open Le Window</button>
</div>

CSS

#container {
    width: 100%;
    text-align: center;
    margin-top: 20px;
}
h1 {
    font-size: 2em;
    color: salmon;
}

JavaScript

(function() {

    $("#container").on("click", "button", function(e) {

        // create the window ON THE FLIES
        $("<div></div>").kendoWindow({
            visible: true,
            title: "Creates Window Out Of Thin Air",
            modal: true,
            width: "400px",
            deactivate: function() {
                this.element.closest(".k-widget").remove();
            }
        }).data("kendoWindow")
        // set the content of the window
        .content("<h1>Acheivement UNLOCKED!</h1>")
        // center this bad boy
        .center()
        // open it
        .open();

    });
})()