jQuery can be a wizard at managing your CSS, but as with any powerful magic, it must be handled with care and consideration or you’ll end up with a giant mess!
There may be instances where modifying specific CSS properties with jQuery makes sense, but as a best practice, it’s best to maintain an organized CSS file and use jQuery to manipulate clearly defined and well-named CSS classes.
In this lesson, you learned:
.css()method can change style properties of an element.
.animate()method can change specific style properties over a period of time.
.addClass()will add a CSS class to an element, and the
.removeClass()method will remove a CSS class.
.toggleClass()method will toggle a class on or off an element.
Incredible work! In the next lesson, you’ll learn about logical selectors. This will enable to you add a click event to one element, and make something happen elsewhere on the page.