One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| var pageURL = window.location.href; | |
| var lastURLSegment = pageURL.substr(pageURL.lastIndexOf('/') + 1); | |
| console.log(lastURLSegment); |
Visit the new improved script here! Smooth scroll to top of page (Improved!)
If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.
<body> tag. Like this: <body id="top">onclick function to the link. Like this: <a href="#top" onclick="scrollToTop(); return false">Back to Top ↑</a>