我正在尝试在关闭时打开一个新的颜色框窗口。
我正在使用这段代码:
$(".inline").colorbox({
inline: true,
width: "50%",
escKey: false,
onClose: function() {
$('#newWindow').show();
}
这段代码有什么问题吗?
最佳答案
描述
假设您使用 jack moore's colorbox jQuery plugin您必须将 onClose
更改为 onClosed
并使用 open:true
。
而且您总是必须关闭该功能。
示例
HTML
<div class="firstColorBox">first</div>
<div class="secondColorBox">second</div>
jQuery
$(".firstColorBox").colorbox({
inline:true,
width:"50%",
escKey:false,
onClosed:function(){
// open the other colorBox
$(".secondColorBox").colorbox({
inline:true,
width:"50%",
escKey:false,
open:true
});
}
});
更多信息
更新
关于javascript - ColorBox Onclose 函数不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8728419/