Kendo UI
jQuery + Kendo UI + MockJax
by Alex Yu
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({
// set some super sexy animation
animation: {
open: {
effects: "slideIn:left fadeIn",
duration: 500
},
close: {
effects: "slide:left fadeOut",
duration: 500
}
},
visible: true,
title: "Creates Window Out Of Thin Air",
modal: true,
width: "400px"
}).data("kendoWindow")
// set the content of the window
.content("<h1>Acheivement UNLOCKED!</h1>")
// center this bad boy
.center()
// open it
.open();
});
})()