Flash 覆盖 Internet Explorer 上的 Thickbox,然后 Flash 消失
我解决了在 Internet Explorer 上使用 Flash 覆盖厚盒的问题,但随后 Flash 图像消失了。我必须刷新页面才能恢复 Flash 图像。我将此编码放入厚盒.js 文件中:
$('object').each(function() {
this.regDisplay=this.style.display; this.style.display='none';
})
$('#TB_window object').each(function(){
this.style.display=this.regDisplay;
})
$('object').each(function(){
this.style.display=this.regDisplay;
})
在厚盒图像放大后,我滚动浏览我的图片库,当我关闭图库时,我的 Flash 图像就会消失。仅当我刷新网页时它才会重新出现。 Flash图像如何保留在页面上而不消失?
感谢您的帮助。
I solved the problem with the flash overlaying thickbox on internet explorer, but then the flash image disappears. I have to refresh the page to get the flash image back. I put this coding in the thickbox.js file:
$('object').each(function() {
this.regDisplay=this.style.display; this.style.display='none';
})
$('#TB_window object').each(function(){
this.style.display=this.regDisplay;
})
$('object').each(function(){
this.style.display=this.regDisplay;
})
After my thickbox images enlarge, I then scroll through my picture gallery and when I close the gallery out, my flash image disappears. It only re-appear when I refresh the web page. How does the flash image stay on the page without disappearing?
Thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:(下面是我的旧答案)
我的旧解决方案导致厚盒的卸载事件不会被触发。我的错:(
问题是,当 IE 中触发卸载事件时,它会以某种方式删除 Flash(不要问我为什么,:p)。
在互联网上挖掘之后,我发现当你将 flash 对象放入 iframe 中时,奇怪的行为将不再发生,:)
我遇到了同样的问题,我刚刚解决了它,:D
我的解决方案是更改 jquery .thickbox.js 文件有点
我发现罪魁祸首在 tb_remove() 函数中,当它尝试触发卸载事件时,解除所有事件的绑定,并删除“#TB_window”、“#TB_overlay”和“#TB_HideSelect” ” 元素。
您应该在 jquery.thickbox.js 文件中找到这一行:
我将调用的方法的顺序更改为:
我希望它可以帮助您,:)
干杯
Edited: (my old answer below)
My old solution caused the unload event of the thickbox will not be triggered. My bad :(
The problem is, when the unload event is triggered in IE, somehow the it will remove the flash (don't ask me why, :p).
After digging around the internet, I found that when you put the flash object inside an iframe that strange behavior won't happen anymore, :)
I ran into the same problem and I just solved it, :D
My solution is to change the jquery.thickbox.js file a bit
I found that the culprit is in the tb_remove() function, when it tries to trigger the unload event, unbind all events, and remove the "#TB_window", "#TB_overlay", and "#TB_HideSelect" elements.
You should find this line in the jquery.thickbox.js file:
I changed the order of the method called into:
I hope it could help you, :)
Cheers