• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript How do I display a div over a div then disappear after 10 seconds?


I have a SWF file that I play on my website. But before this SWF plays, I want to play another SWF file before it. It's about 10 seconds. So I have a two DIVs: one containing the SWF file that I want to play before, and the other div to contain the SWF I want to present. I believe Jquery can be used to solve my problem. Can anyone help? I tried searching the internet but found no solution. Any help would be gladly appreciated! Thanks!
I don't have time to write the code right now, but you can use a setTimeout function to do something after 10 seconds...

<div id="swf_box">
<!-- put your first swf embed html here to start-->


    var secondSwfHTML = ""; // put your second SWF embed code in that variable
    // do something after 10 seconds:
     $("#swf_box").html(secondSwfHTML); // this will replace first swf with second swf
    }, 10000);
    /* If you can't figure it out, hire us :)
}); //document ready
Awesome! Glad you figured it out, remember to select best answer!

If your answer didn't come from CodeForum perhaps share how you solved and the sources :)
Top Bottom