jQuery .fadeIn 使内容在 IE 中不可见
我在让 IE 正常运行时遇到了一些困难。我创建了一个包含各种隐藏 div 的网页。
这些充当子页面,当单击导航项时,它们会以非常基本的灯箱方式淡入/淡出。
它适用于 Firefox 和 Firefox。 Safari 但在 IE (8) 中它会淡入约 60% 然后完全消失,同时也会消除后面 div 的背景?它仍然在那里,因为我可以右键单击图像,只是不可见?
下面显示的代码使#home 淡入%50,然后#subAbout 在消失之前淡入顶部。
任何建议将不胜感激..
$("#nAbout").click(function () {
if(currentActive != "#subAbout") {
$(currentActive).fadeOut('fast');
$('#slideshow').cycle('pause');
$("#home").animate({opacity: .5});
$("#subAbout").fadeIn('slow');
currentActive = "#subAbout";
}
else if(currentActive == "#subAbout") {
$('#slideshow').cycle('resume');
$("#home").animate({opacity: 1});
$("#subAbout").fadeOut('slow');
currentActive="#subHome"
}
return false;
}
);
I'm having some difficulty getting IE to behave. I have created a web page containing various hidden divs.
These act as sub pages, when a nav item is clicked they fade in/out in a very basic lightbox manner.
It works in Firefox & Safari but in IE (8) it fades in to about 60% then vanishes completely, also knocking out the background of the div behind? It's still there because I can right-click the images, just invisible?
The code show below causes #home to fade to %50 then #subAbout fades in over the top before it dissapears.
Any advice would be appreciated..
$("#nAbout").click(function () {
if(currentActive != "#subAbout") {
$(currentActive).fadeOut('fast');
$('#slideshow').cycle('pause');
$("#home").animate({opacity: .5});
$("#subAbout").fadeIn('slow');
currentActive = "#subAbout";
}
else if(currentActive == "#subAbout") {
$('#slideshow').cycle('resume');
$("#home").animate({opacity: 1});
$("#subAbout").fadeOut('slow');
currentActive="#subHome"
}
return false;
}
);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这听起来像是 CSS 冲突。您可以尝试删除内联样式/ css 并看看是否可以重现吗?
This sounds like a CSS conflict. Can you try removing your inline styles/ css and see if you can reproduce?