It’s important to note that this method does not replace a class. It simply adds the class, appending it to any which may already be assigned to the elements.
More than one class may be added at a time, separated by a space, to the set of matched elements, like so:
This method is often used with .removeClass() to switch elements’ classes from one to another, like so:
Here, the myClass and noClass classes are removed from all paragraphs, while yourClass is added.
Add this code before