问题
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>
回答1:
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
回答2:
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
来源:https://stackoverflow.com/questions/38396679/kendo-window-with-minimize-and-maximize