This script provides a smooth scrolling experience for a webpage. It enables smooth scrolling both when using the mouse wheel and when clicking on navigation links to jump to different sections of the page.
- Smooth Scrolling: Ensures smooth vertical scrolling for both mouse wheel interactions and link clicks.
- Cross-Browser Support: Works across all major browsers, including Safari, Chrome, Firefox, and Internet Explorer.
- Customizable: Allows adjustment of scrolling speed and smoothness.
-
Clone the repository:
git clone https://github.com/66HEX/smooth-scroll.git
-
Include the script in your HTML file:
<script src="path/to/smooth-scroll.js"></script>
You can customize the scrolling speed and smoothness by adjusting the parameters passed to the SmoothScroll
function:
new SmoothScroll(document, speed, smooth);
This project is licensed under the MIT License. See the LICENSE file for details.