Now, we create a confirm window by these code:
$(".exitBtn").click(function(e){
e.preventDefault();
var exitWindow = $("<div class='p20 tac' />").kendoWindow({
title: "exit...",
resizable: false,
modal: true
});
exitWindow.data("kendoWindow").content($("#exit").html()).center().open();
exitWindow.find(".confirm,.cancel").click(function() {
if ($(this).hasClass("confirm")) {
alert("blabla...");
}
exitWindow.data("kendoWindow").close();
}).end()
});
<script id="exit" type="text/x-kendo-template">
<p>blabla...</p>
</script>
It's so complicate!!!!!!!!!!
I want to coding in this way:
$(".exitBtn").click(function(){
$("<div class='p20 tac' />").kendoWindow({
title: "exit...",
content: "<p>blabla...</p>",
resizable: false,
modal: true,
center: true,
okVal: "Exit",
cancelVal: "I don't",
ok: function(){
alert(Exiting...);
},
cancel: function(){
exitWindow.close();
}
});
});