O'Reilly logo

Moodle JavaScript Cookbook by Alastair Hole

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

Fading in an element

In this recipe, we will produce a fade-in effect by animating a change in opacity of the element from 0% to 100%. This offers a more subtle approach to making an element visible than simply changing from invisible to visible, or from not displayed to displayed.

Here we can see the key steps in this animation by looking at a selection of frames:

Fading in an element
Fading in an element
Fading in an element

How to do it...

We begin by creating a PHP page to load the Moodle programming environment, ...

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