jQuery makes it extremely simple to add, remove, and toggle classes on and off. If you design your CSS code well, it’s easy to apply some nice effects.
You add classes using the
.addClass(className) method. For example, to add a class named
active to all
<span> elements, you could use the following statement: