Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • 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?

David

Coder
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...

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


<script>

$(document).ready(function(){
    var secondSwfHTML = ""; // put your second SWF embed code in that variable
    
    // do something after 10 seconds:
    setTimeout(function(){
     $("#swf_box").html(secondSwfHTML); // this will replace first swf with second swf
    }, 10000);
    
    /* If you can't figure it out, hire us :)
    https://wubur.com
    Cheers!
    */
    
}); //document ready
</script>
 
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 :)
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom