tags:

views:

56

answers:

2

I have the following code that closes an iframe footer pop-up I have.

<a href="javascript:void(0)" onclick="parent.adpHide('footer')" class='close'>
<img alt='' src="images/close.png" /></a>

That works fine, what I'm wanting though is to set a timer that after 5 seconds closes footer. Any suggestions?

+2  A: 

Change your onclick to:

setTimeout( function() { parent.adpHide('footer'); }, 5000 );
thenduks
+4  A: 
setTimeout(function() { parent.adpHide('footer') }, 5000)
Lytol
dang, I had everything but the function() and couldn't figure out why it wasn't working. thank you!
kylex