I have two kendo windows one below the other in the page with minimize and maximize options. When I close or minimize the first window the window below should come up. Could you please help me achieve this?
<div id="dialog"></div>
<div id="dialog1"></div>
<script>
$("#dialog").kendoWindow({
animation: {
close: false
}
});
$("#dialog1").kendoWindow({
animation: {
close: false
}
});
</script>
Try:
<script>
$("#dialog").kendoWindow({
animation: {
close: false
},
close: function(e) {
var d1 = $("#dialog1").data("kendoWindow");
d1.open();
},
minimize: function(e) {
var d1 = $("#dialog1").data("kendoWindow");
d1.open();
}
});
$("#dialog1").kendoWindow({
animation: {
close: false
}
});
</script>
http://docs.telerik.com/kendo-ui/api/javascript/ui/window#methods-open
Use the toFront() method
$("#dialog1").kendoWindow({
animation: {
close: false
},
actions: [
"Pin",
"Minimize",
"Maximize",
"Close"
],
minimize: function(e) {
var d1 = $("#dialog").data("kendoWindow");
d1.toFront();
},
close: function(e) {
var d1 = $("#dialog").data("kendoWindow");
d1.toFront();
}
});
DEMO