Transition | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Transition

When you click on an option of the navbar, how can I put a transition when the webpage is redirected to that section?

1st Feb 2019, 7:07 PM
Alejo Garat
Alejo Garat - avatar
4 Answers
+ 4
Shudarshan Rai ๐Ÿ‘‘ That will redirect after 1.5 seconds. 15000 is 15 seconds.
1st Feb 2019, 9:08 PM
Rowsej
Rowsej - avatar
+ 2
//setTimeout will will redirect you to sololearn afetr 5seconds <button onClick="openSite()">Go to link</button> <script> function openSite(){ setTimeout(function (){window.location.href="https://www.sololearn.com";},5000); } </script>
1st Feb 2019, 8:49 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 2
Rowsej my fault ๐Ÿ˜…๐Ÿ˜…
1st Feb 2019, 9:12 PM
Sudarshan Rai
Sudarshan Rai - avatar
+ 1
Thank you Shudarshan and Rowsej!!
1st Feb 2019, 9:57 PM
Alejo Garat
Alejo Garat - avatar