Skip to content

Commit 2705cba

Browse files
committed
update README
1 parent b82e21a commit 2705cba

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ disable scroll
44
<a href="https://www.npmjs.com/package/disable-scroll" target="_blank">![](https://badge.fury.io/js/disable-scroll.svg)</a> <a href="https://travis-ci.org/gilbarbara/disable-scroll" target="_blank">![](https://travis-ci.org/gilbarbara/disable-scroll.svg)</a>
55

66
**Prevent page scrolling like a boss.**
7-
Support `scrollbar, mousewheel, touchmove, keydown` events.
7+
Supports `scrollbar, mousewheel, touchmove, keydown` events.
88

99
## Install
1010

@@ -21,13 +21,13 @@ disableScroll.on();
2121
disableScroll.off();
2222
```
2323

24-
## Configuration
24+
## API
2525

2626
### .on([element], [options])
27-
Add the event listeners and scroll.
27+
Disable page scrolling by adding event listeners and locking the scroll position.
2828

2929
- `[element]` - DOM Element. Defaults to `document.body`
30-
- `[options]` - Change the initial options. Defaults to:
30+
- `[options]` - Change the initial options. Defaults to:
3131

3232
```javascript
3333
{
@@ -39,4 +39,8 @@ Add the event listeners and scroll.
3939
```
4040

4141
### .off()
42-
Remove the listeners.
42+
Re-enable page scrolling and remove the listeners.
43+
44+
---
45+
46+
Inspired by [jquery-disablescroll](https://github.com/ultrapasty/jquery-disablescroll)

0 commit comments

Comments
 (0)