autoscroll.js

A JavaScript library that enables delayed, automatic, scrolling

View the Project on GitHub jffrymrtn/autoscroll.js

autoscroll.js

Including autoscroll.js in your website

autoscroll.js is a JavaScript library that enables delayed, automatic, scrolling on one-page, full-width websites.

The library is lightweight and implementation is straightforward.

To include the library in your website, you need to include two files:

<link href="css/autoscroll.css" rel="stylesheet">

and:

<script src="js/delayedscroll.js"></script>

Note: autoscroll.js also depends on JQuery. Make sure you have JQuery included!

Using autoscroll.js

To create full-height-width pages with the delayed scrolling effect, you must first add a autoscroll class to a container <div> directly under <body>:

<body>
    <div class="autoscroll">
        <!-- Pages here -->
    </div>
</body>

Each page is then a nested <div> under the delayedscroll div, labeled as page-*, where * is the page number, starting from 1:

<body>
    <div class="autoscroll">
        <div class="page-1">
            <span>Hi, I'm Page 1</span>
        </div>
        <div class="page-2">
            <span>Nice meeting you! I'm Page 2</span>
        </div>
        <div class="page-3">
            <!-- AFK -->
        </div>
    </div>
</body>

And that's it! You should now be experiencing a surreal delayed scrolling effect on full-height-width pages. Enjoy! :)

Browser Support

autoscroll.js has been tested on:

- Chrome 25.0 and up
- Firefox 20.0.1 and up
- Internet Explorer 10

Examples

Good Design is a simple website I made to show how autoscroll.js works. Check it out!

Contributors

Feel free to contribute to the project! There are many ways to improve the project and probably even more ways to make it efficient. Just fork the project and submit pull requests. As usual, I will evaluate each pull request before accepting them.

License

autoscroll is open and free for the public to share, distribute, and derivate on, as long as attribution is given. It made sense then that the MIT License was the best suited for this, and so autoscroll.js is licensed under the MIT License:

The MIT License (MIT)

Copyright © 2013-2014 Jeffrey Martin

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contact

Having trouble with autoscroll.js? Please file an Issue on the GitHub repository, or email me at: jeffrey.mtn@gmail.com.


Thank you for checking out autoscroll.js!