• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 658
  • Last Modified:

Add time function to show intro javascript

Want to add a time duration function to the below script. On 5 seconds display then hide iframe.
<script>
function showintro() {
document.getElementById('if1').style.display='';
document.getElementById('if1').src='http://clubtuki.com';
}
</script>
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body onload="javascript:showintro()">
<iframe id="if1" src="" style="display:none;" scrolling="no" border="0" frameborder="0" height="250" width="500" marginwidth="0" marginheight="0">
</iframe>

Open in new window

0
jmanstorm
Asked:
jmanstorm
1 Solution
 
Michel PlungjanIT ExpertCommented:
add after
document.getElementById('if1').style.display='';

setTimeout("document.getElementById('if1').style.display='none';",5000)
0
 
jmanstormAuthor Commented:
How could I choose to display a div or new iframe in same location at the end of five seconds.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now