Recently I was needed a To Top solution, but what was out there seemed complicated. There were some plugins for WordPress, but decided to make my own To Top jQuery solution for WordPress. You can adapt this to non-wordpress. Please feel free to use this, but you may not redistribute this as your own work. Pay me with a like to get to the download! Enjoy.
1. Download the file and add it to your theme file.
2. Add this to the head of your WordPress Theme:
<script type="text/javascript">var templateDir = "<?php bloginfo('template_directory') ?>";</script> <script src="<?php bloginfo('template_url'); ?>/to-top-jquery/to-top-jquery.js"></script>