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
If it's not an animation, use setTimeout() directly, like this: $("#myElem"). show(); setTimeout(function() { $("#myElem"). hide(); }, 5000);
To use Javascript promises in a for loop, use async / await . This waits for each promiseAction to complete before continuing to the next iteration in the loop.
$('message').show();
Element.hide.delay(10, 'message');
You can use the delay function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With