Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Code Editor
Web Browser
Learn

Let's add one more feature: when we click the 'Recent Projects' button the background color and text color should change.

We can toggle a CSS class with a jQuery function named toggleClass. The syntax looks like this:

$('.example-class').toggleClass('active')
  1. .toggleClass is a function that will toggle a CSS class on the jQuery selector it's connected to. If the element has the class applied to it, toggleClass will remove it, and if the element does not have the class, it will add it.

  2. 'active' is the class that we will toggle on and off. Notice that toggleClass does not require us to include the period before 'active' since it's already expecting a CSS class.

Report a Bug
If you see a bug or any other issue with this page, please report it here.