In this chapter, we're going to look at some animation methods for navigation. Navigation allows our users to move around to different pages in our site. Adding a bit of animation to this common website feature will spice up our web projects. Spicy is good!
Here's a look at the things we'll be learning in this chapter:
Adding and removing a CSS class to an element when our mouse pointer enters and leaves the element
Changing the styles of a hovered element using the
animate()
method, along with specifying a durationLearning how to smoothly scroll the window to a page element
We're going to make an example that smoothly scrolls and changes the page background color when a link is clicked. Fancy!