Closes #13688: added scroll to top button to div.footer via doc/_temp…
State: closed

- [x] closes #13688
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry

Added scroll to top feature to documentation div.footer using Sphinx template


Labels:
name: Docs

Comments:
I don't think this is the right template

I understand you suggested to add to the theme's main template, but adding it to the div.footer seems like a better approach since it's closer to the end of the page. Any other reason you think it's not the right template? Did you try building the docs and it didn't work?

well did the docs build?

Yes, they build just fine as far as I can tell and the code is inserted just above the `</body>`. 

Here's the bottom of my build for **index.html**

```
    <style type="text/css">
    .scrollToTop {
        text-align: center;
        font-weight: bold;
        position: fixed;
        bottom: 60px;
        right: 40px;
        display: none;
    }
    </style>
    <a href="#" class="scrollToTop">Scroll To Top</a>
    <script type="text/javascript">
    $(document).ready(function() {
        //Check to see if the window is top if not then display button
        $(window).scroll(function() {
            if ($(this).scrollTop() > 200) {
                $('.scrollToTop').fadeIn();
            } else {
                $('.scrollToTop').fadeOut();
            }
        });

        //Click event to scroll to top
        $('.scrollToTop').click(function() {
            $('html, body').animate({
                scrollTop: 0
            }, 500);
            return false;
        });
    });
    </script>
</body>
```

![screen shot 2016-07-17 at 12 36 40 pm](https://cloud.githubusercontent.com/assets/7305354/16902687/396f324e-4c1b-11e6-9c99-f84a59fc959f.jpg)

@jreback, just curious if you had any other feedback on this

@shawnheide Can you explain again why this cannot be added to the doc/source/themes/nature_with_gtoc/static/layout.html ? Can't you add the footer there as well?

But to be clear, the enhancement itself is really nice!

@jorisvandenbossche No reason it couldn't be added. In all honesty I just got a little burnt out on Sphinx and didn't look into last week. I moved it to the theme as you and Jeff requested and changed the commit. Thanks for following up on this. 

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13689?src=pr) is **84.53%**

> Merging [#13689](https://codecov.io/gh/pydata/pandas/pull/13689?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13689   diff @@
==========================================
  Files           141        141          
  Lines         51145      51145          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43233      43233          
  Misses         7912       7912          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [8acfad3...19ba380](https://codecov.io/gh/pydata/pandas/compare/8acfad343c88760a6d09fea221996dd50393fa8a...19ba3801886712967f2ff0b5555fa2231f969a81?src=pr)

@shawnheide Thanks!