https://github.com/statickidz/tiltscroll
Script to scroll webpage to top on device tilt
https://github.com/statickidz/tiltscroll
Last synced: 5 months ago
JSON representation
Script to scroll webpage to top on device tilt
- Host: GitHub
- URL: https://github.com/statickidz/tiltscroll
- Owner: statickidz
- License: mit
- Created: 2015-03-10T18:53:26.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-11T14:25:50.000Z (over 11 years ago)
- Last Synced: 2024-12-31T03:12:32.432Z (over 1 year ago)
- Language: HTML
- Homepage:
- Size: 137 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TiltScroll #

TiltScroll is a simple, easy-to-use JavaScript library to make your website sensitive event tilting the device and automatically move up.
TiltScroll is developed by [StaticKidz](https://statickidz.com/).
## Compatibility ##
I tried and tested on the following mobile browsers and devices:
* Mobile Safari on iOS 8
* Chrome on iOS 8
* Chrome on Android (ICS)
* MacBook (Early 2011) and Chrome
## Usage ##
Include tiltscroll.js in your JavaScript bundle or add it to your HTML page like this:
```html
```
TiltScroll instantiates automatically, don't worry fot that. In addition, you can override default options.
## Options ##
Change the tilt sensitivity that makes the scroll, by default -15, the posible values its 0 to -180.
```js
TiltScroll({
deviceSense: -30
});
```
Or change the scroll duration time in miliseconds:
```js
TiltScroll({
scrollDuration: 5500
});
```
## Live Demo ##
You can test this working [here](https://statickidz.com).
## Credits and collaboration ##
TiltScroll is maintained by [Adrián Barrio Andrés](https://statickidz.com) and the original idea was for [Eduardo Matias](https://twitter.com/Madwardan). All open source code released by StaticKidz is licenced under the MIT licence.