Comparing version 0.0.4 to 1.1.2
{ | ||
"name": "scrolldir", | ||
"version": "0.0.4", | ||
"version": "1.1.2", | ||
"description": "Prefectly track user scroll direction without the jitter", | ||
@@ -5,0 +5,0 @@ "main": "dist/scrolldir.min.js", |
<figure align="center"> | ||
<img alt="scrolldir banner" src="https://cloud.githubusercontent.com/assets/1074042/22093384/09f3c2a6-ddba-11e6-8706-7e63be185448.jpg" /> | ||
</figure> | ||
<p align="center">Prefectly describes vertical scroll direction without the jitter</p> | ||
<p align="center">Perfectly describes vertical scroll direction without the jitter</p> | ||
@@ -25,13 +25,13 @@ <hr> | ||
<h1 align="center">ScrollDir 🔺||🔻</h1> | ||
<h1 align="center">ScrollDir ⬆⬇</h1> | ||
_ScrollDir_ is a micro Javascript library that perfectly describes vertical scroll direction in a html data attribute. From there, do what want. 💪 | ||
_ScrollDir_ is a micro Javascript library that perfectly describes vertical scroll direction in an HTML data attribute. From there, do what want. 💪 | ||
### ScrollDir is perfect for: | ||
- showing or hiding sticky elements based on scroll direction. | ||
- tracking events on scroll direction | ||
- **ignoring small scroll movements** that cause unwanted element jitters. | ||
- Scrolldir will only change direction when the user scrolls a significant vertical amount. | ||
- showing or hiding sticky elements based on scroll direction 🐥 | ||
- tracking events on scroll direction 🔬 | ||
- only changing its direction attribute when scrolled a significant amount 🔥 | ||
- **ignoring small scroll movements** that cause unwanted jitters 😎 | ||
## Installing from a package manager 🌴 | ||
## Install 📦 | ||
@@ -51,12 +51,13 @@ npm | ||
## Setup | ||
## Setup 📤 | ||
Add **dist/scrolldir.min.js**. | ||
## Basic Usage | ||
## Usage 🛠 | ||
```javascript | ||
scrollDir(); | ||
``` | ||
By default ScrollDir will set the `data-scrolldir` attribute on the `<html>` element to `up` or `down`: | ||
By default, ScrollDir will set the `data-scrolldir` attribute on the `<html>` element to `up` or `down`: | ||
@@ -71,3 +72,3 @@ ```html | ||
You can then change your styling based on vertical scroll direction. | ||
Now it's easy to change styling for vertical scroll direction! | ||
@@ -78,3 +79,3 @@ ```css | ||
## Options | ||
## Options ⚗ | ||
@@ -81,0 +82,0 @@ To use an attribute besides `data-scrolldir`: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
98
117205