开发者

flash overlays thickbox on internet explorer, then flash disappears

开发者 https://www.devze.com 2023-01-24 12:11 出处:网络
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 thic

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 s开发者_高级运维croll 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.


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:

$("#TB_window").fadeOut("fast",funtriction(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});

I changed the order of the method called into:

$("#TB_window").fadeOut("fast",funtriction(){$('#TB_window,#TB_overlay,#TB_HideSelect').remove().trigger("unload").unbind();});

I hope it could help you, :)

Cheers

0

精彩评论

暂无评论...
验证码 换一张
取 消