Smooth Scrolling with MooTools Fx.SmoothScroll
I get quite a few support requests for my previous MooTools SmoothScroll article and the issue usually boils down to the fact that SmoothScroll has become Fx.SmoothScroll. Here's a simple usage of Fx.SmoothScroll.
<a href="#contact">Contact Us</a> <!-- goes down to the contact area -->
<!-- more stuff here -->
<a name="contact" id="contact"></a>
<-- more stuff here -->
The only HTML requirement for Fx.SmoothScroll is that all named anchors be given an identical id attribute.
Fx.SmoothScroll accepts two arguments: the area to scroll (defaults to the window) and options for the class. The default options are usually sufficient. One recommendation I do have is to make the duration quick -- no one wants to wait for the animation to finish.
David asked me if I'd be up for a guest post picking out some of my favorite Pens from CodePen. A daunting task! There are so many! I managed to pick a few though that have blown me away over the past few months. If you...
Mozilla's Christian Heilmann is an evangelist that knows how to walk the walk as well as talk the talk. You'll often see him creating sweet demos on his blog or the awesome Mozilla Hacks blog. One of my favorite pieces...
We all know that MooTools 1.2 can do some pretty awesome animations. What if we want to quickly make two element swap positions without a lot of fuss? Now you can by implementing a MooTools swap() method.
MooTools 1.2 Implementation
MooTools 1.2 Usage
To call the swap...