我使用jquery为www.brunodejonghe.be创建了一个弹出式页脚效果。Chrome在jQuery slideToggle之后向页面底部添加空格
它适用于FF,Safari,IE7 +和Opera。当我在Google Chrome中打开页脚时,会在页脚下添加空格。
有没有人知道我能做些什么?
在此先感谢!
jQuery脚本:
$('#contact').click(function() {
<!-- show panel -->
$("#contactpanel").slideToggle(1500);
if ($activated == 1) {
$('#contact').html("<h4>Contacteer me</h4>");
$('#contactpanel').css('height', $('#contactpanel').height() + 'px');
$activated = 0;
}
else {
$('#contact').html("<h4>Verberg</h4>");
// fluid toggle
$('#contactpanel').css('height', $('#contactpanel').height() + 'px');
// scroll to bottom page for pop up footer effect
// detect opera and fix scroll bug
if ($.browser.opera == true)
{
$('html').animate({
scrollTop: $(document).height() - $('#contactpanel').height() + 'px'
}, 1500);
$activated = 1;
}
else {
$('html, body').animate({
scrollTop: $(document).height() - $('#contactpanel').height() + 'px'
}, 1500);
$activated = 1;
}
}
});
它看起来像safari等其他基于webkit的浏览器? – 2011-04-16 13:14:29
它在Safari中正常工作。也许我应该从头开始重新构建,以发现Chrome和Safari之间的jQuery差异。 – Lrnz 2011-04-20 09:58:16
如果这不是太困难,那么这可能是一个选项。如果你确实找到了一些东西,那么一定要发布一个答案来帮助他人 – 2011-04-20 10:08:36