July 2011
Intermediate to advanced
276 pages
5h 11m
English
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.
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/> ...