.removeClass() | jquery set class
Description:Removeasingleclassormultipleclassesfromeachelementinthesetofmatchedelements.BeforejQueryversion1.12/2.2,the.removeClass()methodmanipulatedtheclassNamepropertyoftheselectedelements,nottheclassattribute.Oncethepropertywaschanged,itwasthebrowserthatupdatedtheattributeaccordingly.Thismeansthatwhentheclassattributewasupdatedandthelastclassnamewasremoved,thebrowsermighthavesettheattributesvaluetoanemptystringinsteadofremovingtheattributecompletely.Animplicationofthisbehaviorwasthatthis...
Description: Remove a single class or multiple classes from each element in the set of matched elements.
Before jQuery version 1.12/2.2, the .removeClass() method manipulated the className property of the selected elements, not the class attribute. Once the property was changed, it was the browser that updated the attribute accordingly. This means that when the class attribute was updated and the last class name was removed, the browser might have set the attributes value to an empty string instead of removing the attribute completely. An implication of this behavior was that this method only worked for documents with HTML DOM semantics (e.g., not pure XML documents).
As of jQuery 1.12/2.2, this behavior is changed to improve the support for XML documents, including SVG. Starting from this version, the class attribute is used instead. So, .removeClass() can be used on XML or SVG documents.
More than one class may be removed at a time, separated...