views:

202

answers:

3

Hi,

I have the following code:

$('message').show();
$('message').hide();

How do I add a 10 second delay between the show and hide in prototype?

Thanks

+3  A: 

You can use the delay function

rahul
A: 

I don't know prototype but this is simple with pure JS:

$('message').show();
setTimeout(function(){$('message').hide();}, 10000);
Miquel
+1  A: 
$('message').show();
Element.hide.delay(10, 'message');
artlung