Adding and removing CSS classes is a great way to highlight changes to our pages. jQuery provides the .addClass() and .removeClass() methods.
$("#target").addClass("newclass");
$("#target").removeClass("newclass");
Both methods can take multiple class names, which will be added or removed as needed.
Another method can be used to acheive similar results - the .toggleClass() method. If the class does not already exist on the element,
it is added. Otherwise it is removed.
$("#target").toggleClass("newclass");