Skip to content

Instantly share code, notes, and snippets.

View richstrauss's full-sized avatar

Rich Strauss richstrauss

View GitHub Profile
@richstrauss
richstrauss / floating-back-to-top-button.html
Last active May 6, 2020 04:02
Floating Back to Top Button in the Corner
// http://html-tuts.com/back-to-top-button-jquery/
// Add an anchor link somewhere in your HTML page, by adding a unique class name.
// Preferably add it somewhere outside from any containers, so we can add the fixed position to our floating back to top button.
<a href="#" class="back-to-top">Back to Top</a>
// OR, if you don't have access to html source you can create the link using some jQuery.
// Make sure to add the script below above the ending of </body> tag.
// Don't forget to get jQuery library files and add it above the ending tag of </head>.