Skip to content

Commit 51009c0

Browse files
authored
Update README.md
1 parent cf4fdce commit 51009c0

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@ scroller.on('scroll', function (obj) {
7272

7373
## Usage
7474

75-
### 1. Methods
75+
### Init
7676

7777
```js
78-
// init
7978
$.scrollDirection.init({
8079
// options
8180
});
@@ -98,7 +97,15 @@ $.scrollDirection.init({
9897
|`maxScrollAmount`|function return `number`|`() => $(document).height() - $(window).height()`|Maximum scroll amount.|
9998
|`hijacking`|`boolean`|`false`|Disable update on window scroll event to use custom event.|
10099

101-
### 2. Events
100+
### Update
101+
102+
```js
103+
$.scrollDirection.update({
104+
// update new options
105+
});
106+
```
107+
108+
### Events
102109

103110
```js
104111
// this event runs whenever you load, resize and scroll
@@ -123,7 +130,7 @@ $(window).on("scrollAtMiddle", function () {});
123130
$(window).on("scrollAtBottom", function () {});
124131
```
125132

126-
### 3. APIs
133+
### APIs
127134

128135
You can also check the current scroll direction/position using these provided APIs.
129136

0 commit comments

Comments
 (0)