Skip to content

Commit 9956824

Browse files
committed
📝 update README.md
1 parent b6eb1bf commit 9956824

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<div align="center">
22
<img width="100px" src="https://raw.githubusercontent.com/phucbm/scroll-direction/main/logo.svg" align="center" alt="Scroll Direction" />
33
<h1 align="center">Scroll Direction</h1>
4-
<p align="center">A lightweight jQuery plugin to detect scroll direction on your website. </p>
4+
<p align="center">A lightweight Javascript plugin to detect scroll direction on your website.</p>
55
</div>
66

77
<div align="center">
88
<a href="https://github.com/phucbm/https://badgen.net/github/release/phucbm/jquery-scroll-direction-plugin/?cache=600/releases/latest">
99
<img src="https://badgen.net/github/release/phucbm/jquery-scroll-direction-plugin/?cache=600/?cache=600">
1010
</a>
1111
<a href="https://www.jsdelivr.com/package/gh/phucbm/jquery-scroll-direction-plugin">
12-
<img src="https://data.jsdelivr.com/v1/package/gh/phucbm/jquery-scroll-direction-plugin/badge">
12+
<img src="https://data.jsdelivr.com/v1/package/gh/phucbm/jquery-scroll-direction-plugin/badge?style=rounded">
1313
</a>
14+
<span>
15+
<img src="https://raw.githubusercontent.com/webuild-community/badge/master/svg/made.svg" alt="made-in-vietnam">
16+
</span>
1417
</div>
1518

1619
> **Update**: Scroll Direction now works with other libraries that hijack the native scrollbar (like Locomotive Scroll).
@@ -36,24 +39,27 @@ You can also browse for the latest version by
3639
visiting [Scroll Direction on jsDelivr](https://cdn.jsdelivr.net/gh/phucbm/jquery-scroll-direction-plugin/)
3740

3841
```html
39-
<!-- Scroll Direction - v1.1.0 -->
40-
<script src="https://cdn.jsdelivr.net/gh/phucbm/jquery-scroll-direction-plugin@1.1.0/jquery.scroll-direction.js"></script>
42+
<!-- Scroll Direction - v2.0.0 -->
43+
<script src="https://cdn.jsdelivr.net/gh/phucbm/jquery-scroll-direction-plugin@2.0.0/jquery.scroll-direction.js"></script>
4144
```
4245

4346
or minified version
4447

4548
```html
46-
<!-- Scroll Direction - v1.1.0 -->
47-
<script src="https://cdn.jsdelivr.net/gh/phucbm/jquery-scroll-direction-plugin@1.1.0/jquery.scroll-direction.min.js"></script>
49+
<!-- Scroll Direction - v2.0.0 -->
50+
<script src="https://cdn.jsdelivr.net/gh/phucbm/jquery-scroll-direction-plugin@2.0.0/jquery.scroll-direction.min.js"></script>
4851
```
4952

5053
### Initialize Scroll Direction
5154

5255
After init, you will have some classes on your body tag to indicate the scroll direction and position.
5356

5457
```js
55-
// init Scroll Direction
58+
// jQuery
5659
$.scrollDirection.init();
60+
61+
// Pure JS
62+
window.scrollDirection.init();
5763
```
5864

5965
```html

0 commit comments

Comments
 (0)