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
Thanks for your efforts. Truly appreciate it. Will check regularly for any updates or contributions from the GANG!
Anybody find a 'Scroll To Top' Code that works in Chrome. Is there any place I can go (On The Web) and find a 'TRUSTED' Source where a code can be Copied then Pasted on my site http://zorbal.com/ . I see so many websites/directories/social pages with a simple 'Scroll Up' button that actually works. Of course my site is a problem....UGGH!
Here's something I just came up with it is working in all browsers that I tried it in. :-)
Ning 3.0 the code goes in your custom code end of page code box, or if you're on a Ning 2.0 the code goes in your NC custom code box.
To change the position of the button just change the numbers in the CSS
"bottom" and "right"
<!-- GC scroll to top -->
<style>.scrollup {
z-index:3!important;
width: 40px;
height: 40px;
position: fixed;
bottom: 50px;
right: 75px;
display: none;
text-indent: -9999px;
background-image: url(http://bit.ly/2g72v4I)!important;
background-size: contain!important;
background-position: center;
background-repeat: no-repeat;
}</style>
<script src="http://bit.ly/2ghF86J" type="text/javascript"></script>
George you nailed it! I am now the proud father of a "Scroll Up" Arrow. Thank You so very much, Sir.
Hey George, Scroll Up Button Guy here. If I am pushing my luck, please let me know. Would you happen to have an 'Scroll DOWN' Code that could be used on my site? I figured 1 down & 1 up....Some of my pages have over 40 Biz/Services listed. Many area users know that pages are long. It would be super cool if I could gave all users a wonderful Tool for them to better Navigate. Thank You for helping me in my time of need. Very Cool.
Beautiful. I moved mine from 'right' to the 'left'. Works beautifully. Thank you for jumping in here George.
How can I change my Scroll Down to the LEFT SIDE? I am rather slow at this so please bare with me. Definitely would like it on the Left as does Kos. Also could use a 'Scroll Up' Code if anyone can help. I am thankful for this service. Cool Community. I have been with NING/GLAM & Present Owner{s} for over 5 years now.
Where it says 'right: 75px;' just change that to
left: 50px;
Sorry I can't help you further. I'm a novice myself. Good luck
Awesome. It worked. You guys (girls) are good. I really appreciate your efforts and also making it painless!