I have a flash file that is in a div that is hidden when the page is loaded with the css property display:none
. The div with the flash content is then 开发者_C百科shown at a later stage through javascript.
When will the flash file load? Ideally, I only want it to load when the div is shown.
What i would do is load the flash file only if the div is visible, what you can also do is create a <noscript>
tag around the flash file so when javascript is disabled it will still display.
if($(div).is(":visible")){
$(this).load("flash.swf");
}
精彩评论