jQuery Scrolling
Detecting Scroll Events
Demo
https://krescentmoon.github.io/jquery-scrolling/
Github
https://github.com/krescentmoon/jquery-scrolling/
Structure
o |-- dist | |-- jquery-scrolling.js | `-- jquery-scrolling.min.js |-- docs | |-- assets/ | | |-- css/ | | |-- ico/ | | |-- js/ | | `-- vendor/ | |-- index.html | `-- LICENSE |-- CHANGELOG |-- LICENSE `-- README.md
Installation
<script src="jquery.js"></script> <script src="jquery-scrolling.min.js"></script>
Options
| option | type | default | description | |-------------- |--------- |------------------------- |------------- | | offsetStart | number | $(window).height()/2 | | | offsetFinish | number | $('#colophon').height() | | | timer | number | null | | | scrolled | boolean | null | | | move | number | 0 | | | delta | number | 10 | | | first | boolean | null | | | current | number | 0 | | | last | number | 0 | | | debug | boolean | false | |
Usage
$('.example').scrolling([options]);
Example
Simple Example
$('.window-popup').scrolling();
Example with options
$('.example').scrolling({ offsetStart : $(window).height()/2, offsetFinish : $('#colophon').height(), debug : false });
Example with data-attribute
<div class="example" data-scrolling='{"debug":true}'>hello</div>
<script> $('.example').scrolling(); </script>
Output Class
.firsting, .starting, .moving, .finishing, .downing, .uping
Browser Support
IE9+, Edge, Chrome, Firefox, Opera, Safari
Changelog
Please see CHANGELOG for more information what has changed recently.
License
jQuery Scrolling is licensed under the MIT LICENSE