How to make a go to "TOP" button? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 3

How to make a go to "TOP" button?

It is positioned at the bottom right and when clicked, it will dynamically scrolls up the screen til the top.

27th Aug 2017, 10:51 AM
Feelc
4 Antworten
+ 6
i suggest you to see my code here all you need to add <a href"#top">Top </a> with property of position:fixed in the paragraph https://code.sololearn.com/WyxZQdEnAcjG/?ref=app and here is the solution you asked combine these to make a good one https://code.sololearn.com/Wd3Fkda12777/?ref=app
27th Aug 2017, 11:24 AM
Melih Melik Sonmez
Melih Melik Sonmez - avatar
+ 3
@Ivan you can use jquery or any other framework but being simple is always the best. anchor link will works faster. with using position property you can give animation effect by sticky or fixed values and may be you can add onclick event to make animation by js . if you learn jquery or alike frameworks everything will be much easier i admit that.
28th Aug 2017, 3:56 AM
Melih Melik Sonmez
Melih Melik Sonmez - avatar
27th Aug 2017, 2:13 PM
Calviղ
Calviղ - avatar