O'Reilly logo

MooTools 1.3 Cookbook by Jay Larry G. Johnston

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Welcome visitors with a message that fades in for effect

In this recipe, you will learn how to fade in a block of text using color. Often, using a fade-in of a block of color will help users to orient themselves to what portion of the page is asking for attention.

Getting ready

Choose some text that needs to appear, perhaps an error message. Also, have a color palette in mind so that the design factor will not slow down the coding effort.

How to do it...

We begin with a recipe quite similar to the pop-up error injection recipe in Chapter 3, And on the 8th Day: Creating HTML Elements. The twist is that we fade in the error gently to increase the professionalism of the user interface. Note that we do not need the MooTools MORE in this recipe, though ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required