Skip to content

Commit

Permalink
updated docs with 'disable' option
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Sajnóg committed Aug 27, 2015
1 parent 3e906b0 commit 05da764
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,34 @@ To do this, pass options object to `init()` function, like so:
</script>
```

#### Additional configuration

If you want to disable AOS on certain device or under any statement you can set `disable` option. Like so:

```javascript
<script>
AOS.init({
disable: 'mobile'
});
</script>
```

There are several options that you can use to fit AOS perfectly into your project, you can pass one of three device types:
`mobile` (phones and tablets), `phone` or `tablet`. This will disable AOS on those certains devices. But if you want make your own condition, simple type your statement insted of device type name:

```javascript
disable: window.innerWidth < 1024
```

There is also posibility to pass a `function`, which should at the end return `true` or `false`:

```javascript
disable: function () {
var maxWidth = 1024;
return window.innerWidth < maxWidth;
}
```

## Contribution

I use gulp to concatenate JS & CSS and minify it.
Expand Down

0 comments on commit 05da764

Please sign in to comment.