Showing a tall page slowly as visitors watch

With what we've seen in the previous recipe, you should understand that the methodology behind scrolling an element is based on a two-element structure where one is the smaller, viewable area that masks the larger, content-containing element, and this larger, content element scrolls smoothly behind the viewable element.

How to do it...

Create a DIV with some content in it that can be scrolled. Use Moo-effects to create the scrolling process, then listen for user input to adjust the scrolling mechanism.

<script type="text/javascript" src="mootools-1.3.0.js"></script> <script type="text/javascript" src="mootools-more-1.3.0.js"></script> </head> <body> <div id="news"> Lorem ipsum dolor sit amet, ....<br/><br/> ...

Get MooTools 1.3 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.