淡入/淡出 Ext.window
Fade in /Fade out in Ext.window
我正在使用
var modalWindow = new Ext.Window({
title: "Window",
items: [
{html: "<div id='example'>Hello</div> "}
]
});
modalWindow.show();
打开模式 window。我需要 fadein/fadeout 这个 window 的功能。
请帮助..
应该这样做:
var modalWindow = new Ext.Window({
title: "Window",
width: 400,
height: 300,
html: "<div id='example'>Hello</div> ",
listeners : {
show : function(window) {
window.getEl().setOpacity(0);
window.getEl().fadeIn({duration: 2000});
},
beforeclose : function(window) {
if(!window.shouldClose) {
window.getEl().fadeOut({duration: 2000, callback: function() {
window.shouldClose = true;
window.close();
}});
}
return window.shouldClose ? true : false;
}
}
});
modalWindow.show();
我正在使用
var modalWindow = new Ext.Window({
title: "Window",
items: [
{html: "<div id='example'>Hello</div> "}
]
});
modalWindow.show();
打开模式 window。我需要 fadein/fadeout 这个 window 的功能。 请帮助..
应该这样做:
var modalWindow = new Ext.Window({
title: "Window",
width: 400,
height: 300,
html: "<div id='example'>Hello</div> ",
listeners : {
show : function(window) {
window.getEl().setOpacity(0);
window.getEl().fadeIn({duration: 2000});
},
beforeclose : function(window) {
if(!window.shouldClose) {
window.getEl().fadeOut({duration: 2000, callback: function() {
window.shouldClose = true;
window.close();
}});
}
return window.shouldClose ? true : false;
}
}
});
modalWindow.show();