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

Scrolling an element

In this recipe, we will look at how to animate the scrolling of content within a container element. We will scroll the content of a div tag, that is, the width and height that have been set to force the content to overflow, and also set that overflow to be hidden.

We can see the key steps in this animation by looking at the following selection of frames:

Scrolling an element
Scrolling an element
Scrolling an element

How to do it...

We begin by creating a PHP page to set up a basic Moodle programming ...

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