Can you delay a text for some time before it display | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

Can you delay a text for some time before it display

no clue

27th Aug 2018, 6:14 PM
Lesley Tulienge
Lesley Tulienge - avatar
5 Answers
+ 9
Hi Lesley Tulienge, In Javascript: setTimeout (function delay() { console.log("Delayed string"); }, 2000); 2000 is in miliseconds which is in this case 2 seconds setTimeout is only looping once throught the code. setInterval will loop infinity without clearInterval. https://code.sololearn.com/WJT4V3hjitzM/?ref=app
27th Aug 2018, 9:04 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
28th Aug 2018, 1:45 AM
Amir Ahmad
Amir Ahmad - avatar
+ 2
You can use css "animation" property (setting "animation-delay" also) on opacity prop. With js you can use setTimeout for change css of your element... Search in Google for futher info
27th Aug 2018, 7:14 PM
KrOW
KrOW - avatar
+ 2
Yes ⌚
27th Aug 2018, 8:18 PM
Ryan Els
Ryan Els - avatar
0
of course using animation from css
29th Aug 2018, 2:28 AM
Felix Duodu
Felix Duodu - avatar