Skip to content

Commit

Permalink
version 0.2.5 - bower
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbarbara committed Sep 12, 2015
1 parent f160d4b commit 1b6a4b2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,37 @@ Supports `scrollbar, mousewheel, touchmove, keydown` events.

## Install

### npm
```javascript
npm install --save disable-scroll
```

## Usage
and require it

```javascript
var disableScroll = require('disable-scroll');
```

### bower
```javascript
bower install --save disable-scroll
```

Reference the script in your html file

disableScroll.on();
```html
<script src="disable-scroll.min.js"></script>
```

## Usage

```javascript
disableScroll.on(); // prevent scrolling
...
disableScroll.off();
disableScroll.off(); // re-enable scroll
```


## API

### .on([element], [options])
Expand All @@ -39,7 +57,7 @@ Disable page scrolling by adding event listeners and locking the scroll position
```

### .off()
Re-enable page scrolling and remove the listeners.
Re-enable page scrolling and destroy the listeners.

---

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "disable-scroll",
"version": "0.2.0",
"version": "0.2.5",
"description": "Prevent page scroll",
"author": "Gil Barbara <gilbarbara@gmail.com>",
"repository": {
Expand Down

0 comments on commit 1b6a4b2

Please sign in to comment.