From the course: Interactive Animations with CSS and JavaScript

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Randomize slide displays

Randomize slide displays

From the course: Interactive Animations with CSS and JavaScript

Start my 1-month free trial

Randomize slide displays

- [Instructor] So, if our presentation were an action movie, the building would be about to explode. We are at the point where we are going to show our learning montage and we are going to rapidly, and we have rapidly exceeded the limitations of simple CSS and HTML, because what I want to show is a series of images that are randomly selected. I want to show, sometimes I want to show a circle with a yes flag, sometime I want to show other shapes with a no flag, and I want that to be repeated over and over and get faster and faster. And I want it to be random, I don't want it to be a pre-scripted series of things because number one, I don't want to sit there and decide what they all are. And number two, it just makes the presentation more interesting, you can watch it again and it would be a little different, which I think is cool. So in order to make this happen, we're going to have to use Javascript, so we have implemented our callback function so we have a hook to initiate this…

Contents