Let visitors scroll to the top of your page with a click.This is my first code made on my own.I have been looking for the script here on creators.But the few i found did not work.So i decided to try to make it by myself.Here is the code to, Scroll to the top:
<a href="javascript:;" onclick="document.documentElement.scrollTop = 0;" >
<img src='https://api.ning.com/files/RkZEUQ-IHifO4wg7KTMdwuuxfUgvzR59NT0vz7gt4vYXYIPr8c7-5nU0rCppnd3fyYQbkHGkLJBny*IdkY2pnqy20oz7tiMd/redarrow.png' alt='scroll to the top' title="Scroll to the top" style='position: fixed; bottom: 25px; right: 10px;'></a>
You can change your image here:
And You can change your position here:
<a href="javascript:;" onclick="document.documentElement.scrollTop = 0;" >
<img src='https://api.ning.com/files/RkZEUQ-IHifO4wg7KTMdwuuxfUgvzR59NT0vz7gt4vYXYIPr8c7-5nU0rCppnd3fyYQbkHGkLJBny*IdkY2pnqy20oz7tiMd/redarrow.png' alt='scroll to the top' title="Scroll to the top" style='position: fixed; bottom: 25px; right: 10px;'></a>
After You have done what you need to do?
Add the code to your custom code and you are done!
Well, You can also see the result here:
Best regards
Klaus
Replies
Hi Klaus, how do I find my custom code?
Hi Bruce, If you go to your dashboard.You will find your custom code under tools!
My Network>tools>Custom code.
Thank you both, very much. Once I saw it, I was embarrassed at it's open location :-)
Here are two more arrows for everyone to choose from. Have fun.
I have tried this code for "Scroll To Top' of page. I pasted Custom Code Given in TOOLS Custom Code Section and clicked SAVE. The small little box appears but it is not LIVE! What do I need to do - change - add something to the Code for it to work. I am ALL THUMBS with this stuff. My website is http://zorbal.com/ . Should and how do I add something to Code so it is activated on my site?
Chris it just worked for me. Be certain scroll down the page........and then press it.
Hey Kos. Yeah, the 'Scroll To Top' does not work for me on my site. I do not know if you tried button on my site. If someone could also show me how to put an arrow up on a working 'Scroll Up' Button. I am seriously delinquent. Thank You.
You're welcome Christopher and Kos. :-)
Christopher I'll see what I can do about the scroll down button. You guys have a great day.
Okay I see that it's not working in Chrome. I'll search the web but maybe we'll get lucky and someone 'here' will have a solution. Guys..............gals?