An open API service indexing awesome lists of open source software.

https://github.com/evavic44/jquery-smooth-scroll

A jQuery solution I use quite often for scrolling to same page links smoothly.
https://github.com/evavic44/jquery-smooth-scroll

Last synced: about 2 months ago
JSON representation

A jQuery solution I use quite often for scrolling to same page links smoothly.

Awesome Lists containing this project

README

          

## Smooth Scroll - jQuery

### This is a simple illustration website to explain how smooth scrolling works and looks like.

Copy this script tag and paste in html page to use:

```js

```

##### [jQuery link to other versions](https://code.jquery.com/)

### jQuery block of code: :point_down:

```js
{
// Smooth Scrolling
$('#navbar a, .btn').on('click', function (e) {
if (this.hash !== '') {
e.preventDefault();

const hash = this.hash;

$('html, body').animate(
{
scrollTop: $(hash).offset().top - 100,
},
800
);
}
});
}
```