3.1.2 • Published 6 years ago

jquery.simple-scroll-follow v3.1.2

Weekly downloads
41
License
MIT
Repository
github
Last release
6 years ago

jquery.simple-scroll-follow

npm version Build Status

jQuery plugin to move the element according to the scrolling window.

Sample image

Demo

https://sutara79.github.io/jquery.simple-scroll-follow/

Install

  • GitHub: Clone or download.
  • npm: npm i jquery.simple-scroll-follow
  • CDN (jsDelivr):
    • jquery.simple-scroll-follow.min.js: v3.1.2

Usage

HTML
<div id="foo">Element to follow</div>

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="jquery.simple-scroll-follow.min.js"></script>
CSS
body {
  background: url(null) fixed; /* for Google Chrome */
}

#foo {
  position: absolute;
}
JavaScript
$('#foo').simpleScrollFollow();

Option

nametypedefaultdescription
limit_elemObject, string$('body')Lower limit of target element.
min_widthnumber0When windows width is less narrow than this, this plugin stops.
enabledbooleantrueIf it is false, this plugin stops.
upper_sidestringnullUpper side of target element.
lower_sidestringnullLower side of target element.

Public Method

(since v3.0.0)

.setEnabled()

Parameter
No.typedefaultdescription
1booleantruetrue: this plugin resumes.false: this plugin stops.

License

MIT

Author

Yuusaku Miyazaki ( toumin.m7@gmail.com )

3.1.2

6 years ago

3.1.1

7 years ago

3.1.0

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago