Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/konapun/jquery.sticky-scroll.js

Make an element stick to the top or bottom of the page as the page scrolls
https://github.com/konapun/jquery.sticky-scroll.js

Last synced: 22 days ago
JSON representation

Make an element stick to the top or bottom of the page as the page scrolls

Awesome Lists containing this project

README

        

# jquery.sticky-scroll.js
Make an element scroll with the page, optionally containing a pin/unpin element

### HTML
```html









Gonna scroll with the page!

```

### Javascript
```js
$('.sticky-header').stickyScroll({
stick: $('#unstick-button'),
unstick: $('#stick-button')
});
```

### Positioning
You can also make an element stick to the top or bottom of the page by adding the class `stick-top` or `stick-bottom` to your sticky element