Jquery colorbox无法推动stickyfooter

时间:2013-06-05 13:57:04

标签: jquery css

我有一个网站使用jquery colorbox

但是我的颜色框div's height高于窗口尺寸。

颜色框z-index位于顶部。因此,它无法推动我的css sticky footer

有什么方法可以解决这个问题吗?或者可以在用户点击彩色框时删除页脚,并在用户关闭框后将其放回。

#container{
    min-height:100%; height: 100%; height: auto !important;
    width:1110px; overflow:hidden;
    margin: 0 auto;
}
#footer{
    position:relative;
    left: 0;
    bottom: 0;
    height:50px; width:100%; background:#4D4D4D;
}

1 个答案:

答案 0 :(得分:2)

colorbox documentation开始,您可以使用cbox_loadcbox_closed个事件。

$(document).bind('cbox_load', function() { 
   $('#footer').hide(); 
});

$(document).bind('cbox_closed', function() { 
   $('#footer').show(); 
});

或者您可以使用onLoadonClosed回调。

相关问题