The full video and many others like it are all available as part of our Frontend Masters subscription.

Rachel Nabors

Rachel Nabors is a CSS animations fanatic and award-winning cartoonist. A regular conference speaker, she ignites new technology with her experience in visual storytelling.

Rachel Nabors

Web Animation

In this exercise, you will show and hide elements using a .loading class.
- http://cdpn.io/JDcwI

Get Unlimited Access Now

Rachel Nabors: So here's a small exercise for sensing visual play readiness. When the browser has finished loading everything, we want to change the class to remove the visibility of the spinner. So we're going to show and hide the spinner using the loading class. There's some information in the actual exercise about what to do.

I'm going to give you ten minutes to do it, and then we're going to do it together. And yes we're using jQuery, but if you don't want to use jQuery, because you object to jQuery, I respect your objection. You can totally go ahead and use JavaScript, plain old, good old JavaScript, if you like.

But I'll be using jQuery. You're going to listen for that load event.

Ready to take your code to the next level?

Intense courses with world-class teachers and unlimited access to our growing library of videos for the great price of $39 per month.

Get Unlimited Access Now