Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sutara79/jquery.simple-scroll-follow
jQuery plugin to move the element according to the scrolling window.
https://github.com/sutara79/jquery.simple-scroll-follow
jquery jquery-plugin
Last synced: about 1 month ago
JSON representation
jQuery plugin to move the element according to the scrolling window.
- Host: GitHub
- URL: https://github.com/sutara79/jquery.simple-scroll-follow
- Owner: sutara79
- Created: 2014-06-21T09:27:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-08-12T06:55:00.000Z (over 6 years ago)
- Last Synced: 2024-08-09T01:42:26.934Z (5 months ago)
- Topics: jquery, jquery-plugin
- Language: JavaScript
- Homepage: https://sutara79.github.io/jquery.simple-scroll-follow/
- Size: 805 KB
- Stars: 36
- Watchers: 9
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# jquery.simple-scroll-follow
[![npm version](https://img.shields.io/npm/v/jquery.simple-scroll-follow.svg)](https://www.npmjs.com/package/jquery.simple-scroll-follow)
[![Build Status](https://travis-ci.org/sutara79/jquery.simple-scroll-follow.svg?branch=master)](https://travis-ci.org/sutara79/jquery.simple-scroll-follow)jQuery plugin to move the element according to the scrolling window.
![Sample image](sample/image.png)
## Demo
https://sutara79.github.io/jquery.simple-scroll-follow/## Install
- [GitHub](https://github.com/sutara79/jquery.simple-scroll-follow): Clone or download.
- [npm](https://www.npmjs.com/package/jquery.simple-scroll-follow): `npm i jquery.simple-scroll-follow`
- CDN ([jsDelivr](https://github.com/jsdelivr/jsdelivr#usage)):
- jquery.simple-scroll-follow.min.js: [v3.1.2](https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.simple-scroll-follow.min.js)## Usage
###### HTML
```htmlElement to follow```
###### CSS
```css
body {
background: url(null) fixed; /* for Google Chrome */
}#foo {
position: absolute;
}
```###### JavaScript
```javascript
$('#foo').simpleScrollFollow();
```## Option
|name|type|default|description|
|--|--|--|--|
|[limit_elem](http://sutara79.github.io/jquery.simple-scroll-follow/#limit_elem)|Object, string|`$('body')`|An element that indicates lower limit to scroll|
|[min_width](http://sutara79.github.io/jquery.simple-scroll-follow/#min_width)|number|`0`|Minimum window width to enable this plugin|
|[enabled](http://sutara79.github.io/jquery.simple-scroll-follow/#enabled)|boolean|`true`|Enable scroll or not|
|[upper_side](http://sutara79.github.io/jquery.simple-scroll-follow/#fixed-elem)|string|`null`|An fixed element that indicates upper limit to scroll|
|[lower_side](http://sutara79.github.io/jquery.simple-scroll-follow/#fixed-elem)|string|`null`|An fixed element that indicates lower limit to scroll|## Public Method
(since v3.0.0)For the details, see [documentation](http://localhost/gh-pages/jq-plugin/jquery.simple-scroll-follow/#public-method).
### .setEnabled()
##### Parameter|No.|type|default|description|
|--|--|--|--|
|1|boolean|`true`|`true`: this plugin resumes.
`false`: this plugin stops.|## License
[MIT](https://www.opensource.org/licenses/mit-license.php)## Author
[Yuusaku Miyazaki](http://sutara79.hatenablog.com/entry/2014/06/21/185709)
( )