Overview
With this week's lesson, we learn how to use animation and JavaScript to add motion and interactivity to a page. This functionality can be created using CSS animations, transformations, jQuery, and even plain JavaScript. But while these can be used to create a pretty cool effects, they should be used sparingly. Having too many elements moving around can confuse your user and depending on what you are using, it can slow down your loading times. So, use your effects mindfully. The main three reasons you want to use motion are for a state change, for emphasis, and to reveal. For state changes, you can play small animations while something is loading or create a smooth transition when you toggle an element. To create emphasis, you can have an element shake to draw attention to it when the page loads or have elements slide in as you scroll down the page. To reveal something, you can use jQuery effects to slide visibility up and down or have information appear when you hover over an element. Below I have detailed some examples of what you can do as a developer.